diff --git a/firebase.json b/firebase.json index 6ba6cbba133..ab24115b7bd 100644 --- a/firebase.json +++ b/firebase.json @@ -63,7 +63,7 @@ { "source": "/f/flutter-survey-metadata.json", "destination": "https://storage.googleapis.com/flutter-uxr/surveys/flutter-survey-metadata.json", "type": 301 }, { "source": "/faq", "destination": "/resources/faq", "type": 301 }, { "source": "/fastlane-cd", "destination": "/deployment/cd#fastlane", "type": 301 }, - { "source": "/flutter-for-:platform*", "destination": "/get-started/flutter-for/:platform*-devs", "type": 301 }, + { "source": "/flutter-for-:platform*", "destination": "/flutter-for/:platform*-devs", "type": 301 }, { "source": "/formatting", "destination": "/tools/formatting", "type": 301 }, { "source": "/gestures", "destination": "/ui/advanced/gestures", "type": 301 }, { "source": "/glossary", "destination": "/resources/glossary", "type": 301 }, @@ -93,8 +93,8 @@ { "source": "/responsive*", "destination": "/ui/layout/responsive/adaptive-responsive", "type": 301 }, { "source": "/routing-and-navigation", "destination": "/ui/navigation", "type": 301 }, { "source": "/sdk-archive", "destination": "/install/archive", "type": 301 }, - { "source": "/setup-:os*", "destination": "/get-started", "type": 301 }, - { "source": "/setup", "destination": "/get-started", "type": 301 }, + { "source": "/setup-:os*", "destination": "/install", "type": 301 }, + { "source": "/setup", "destination": "/install", "type": 301 }, { "source": "/technical-overview", "destination": "/resources/architectural-overview", "type": 301 }, { "source": "/text-input", "destination": "/cookbook/forms/text-input", "type": 301 }, { "source": "/tutorial", "destination": "/learn/tutorial", "type": 301 }, @@ -106,7 +106,7 @@ { "source": "/using-ide-vscode", "destination": "/tools/vs-code", "type": 301 }, { "source": "/using-ide", "destination": "/tools/android-studio", "type": 301 }, { "source": "/using-packages", "destination": "/packages-and-plugins/using-packages", "type": 301 }, - { "source": "/web-analogs", "destination": "/get-started/flutter-for/web-devs", "type": 301 }, + { "source": "/web-analogs", "destination": "/flutter-for/web-devs", "type": 301 }, { "source": "/webflutter.dev/web", "destination": "/web", "type": 301 }, { "source": "/widgets-intro", "destination": "/ui", "type": 301 }, { "source": "/widgets", "destination": "/ui/widgets/catalog", "type": 301 }, @@ -134,22 +134,28 @@ { "source": "/cookbook/testing/widget-test-introduction", "destination": "/cookbook/testing/widget", "type": 301 }, { "source": "/cookbook/testing/widget-test-tap-drag", "destination": "/cookbook/testing/widget/tap-drag", "type": 301 }, { "source": "/deployment/fastlane-cd", "destination": "/deployment/cd#fastlane", "type": 301 }, - { "source": "/get-started/codelab-web", "destination": "/get-started/codelab", "type": 301 }, + { "source": "/get-started", "destination": "/install", "type": 301 }, + { "source": "/get-started/custom", "destination": "/install/custom", "type": 301 }, + { "source": "/get-started/codelab", "destination": "/learn/pathway", "type": 301 }, + { "source": "/get-started/codelab-web", "destination": "/learn", "type": 301 }, { "source": "/get-started/editor", "destination": "/tools/editors", "type": 301 }, - { "source": "/get-started/flutter-for", "destination": "/get-started/learn-flutter", "type": 301 }, - { "source": "/get-started/flutter-for/ios-devs", "destination": "/get-started/flutter-for/swiftui-devs", "type": 301 }, - { "source": "/get-started/fwe/:rest*", "destination": "/get-started/fundamentals/:rest*", "type": 301 }, - { "source": "/get-started/install", "destination": "/get-started", "type": 301 }, + { "source": "/get-started/flutter-for", "destination": "/learn", "type": 301 }, + { "source": "/get-started/flutter-for/ios-devs", "destination": "/flutter-for/swiftui-devs", "type": 301 }, + { "source": "/get-started/flutter-for/:rest*", "destination": "/flutter-for/:rest*", "type": 301 }, + { "source": "/get-started/fwe/*", "destination": "/learn/pathway", "type": 301 }, + { "source": "/get-started/fundamentals", "destination": "/learn/pathway", "type": 301 }, + { "source": "/get-started/fundamentals/*", "destination": "/learn/pathway", "type": 301 }, + { "source": "/get-started/install", "destination": "/install", "type": 301 }, { "source": "/get-started/install/help", "destination": "/install/troubleshoot", "type": 301 }, - { "source": "/get-started/install/:rest*", "destination": "/get-started", "type": 301 }, - { "source": "/get-started/learn-more", "destination": "/get-started/learn-flutter", "type": 301 }, - { "source": "/get-started/test-drive*", "destination": "/get-started/codelab", "type": 301 }, + { "source": "/get-started/learn-flutter", "destination": "/learn", "type": 301 }, + { "source": "/get-started/learn-more", "destination": "/learn", "type": 301 }, + { "source": "/get-started/test-drive*", "destination": "/learn/pathway", "type": 301 }, { "source": "/get-started/uninstall", "destination": "/install/uninstall", "type": 301 }, { "source": "/get-started/web", "destination": "/platform-integration/web/building", "type": 301 }, + { "source": "/get-started/quick", "destination": "/install/quick", "type": 301 }, { "source": "/ios-14", "destination": "/platform-integration/ios/ios-debugging", "type": 301 }, { "source": "/ios-project-migration", "destination": "https://web.archive.org/web/20220614103526/https://docs.flutter.dev/development/ios-project-migration", "type": 301 }, { "source": "/layout", "destination": "/ui/layout", "type": 301 }, - { "source": "/learn", "destination": "/get-started/learn-flutter", "type": 301 }, { "source": "/material-3-migration", "destination": "/release/breaking-changes/material-3-migration", "type": 301 }, { "source": "/packages-and-plugins/androidx-compatibility", "destination": "/platform-integration/android/androidx-migration", "type": 301 }, { "source": "/packages-and-plugins/c-interop", "destination": "/platform-integration/android/c-interop", "type": 301 }, @@ -191,7 +197,7 @@ { "source": "/resources/ai-overview", "destination": "/ai/create-with-ai", "type": 301 }, { "source": "/resources/books", "destination": "https://docs.flutter.dev/reference/learning-resources", "type": 301 }, { "source": "/resources/compatibility", "destination": "/release/compatibility-policy", "type": 301 }, - { "source": "/resources/dart-swift-concurrency", "destination": "/get-started/flutter-for/dart-swift-concurrency", "type": 301 }, + { "source": "/resources/dart-swift-concurrency", "destination": "/flutter-for/dart-swift-concurrency", "type": 301 }, { "source": "/resources/platform-adaptations", "destination": "/platform-integration/platform-adaptations", "type": 301 }, { "source": "/resources/rendering", "destination": "/resources/architectural-overview#rendering-and-layout", "type": 301 }, { "source": "/resources/security-false-positives", "destination": "/reference/security-false-positives", "type": 301 }, @@ -850,7 +856,7 @@ { "source": "/to/switch-flutter-version", "destination": "/install/upgrade#switch-to-a-specific-flutter-version", "type": 301 }, { "source": "/to/team-infra", "destination": "https://github.com/flutter/flutter/blob/main/docs/triage/Infra-Triage.md", "type": 301 }, { "source": "/to/template", "destination": "https://flutter.dev/go/template", "type": 301 }, - { "source": "/to/test-drive", "destination": "/get-started/quick", "type": 301 }, + { "source": "/to/test-drive", "destination": "/install", "type": 301 }, { "source": "/to/track-widget-creation", "destination": "/tools/devtools/inspector#track-widget-creation", "type": 301 }, { "source": "/to/troubleshoot-devices", "destination": "/install/troubleshoot", "type": 301 }, { "source": "/to/unbounded-constraints", "destination": "/ui/layout/constraints#unbounded", "type": 301 }, diff --git a/site/lib/src/style_hash.dart b/site/lib/src/style_hash.dart index ce114383cc9..ccfd83ccbe2 100644 --- a/site/lib/src/style_hash.dart +++ b/site/lib/src/style_hash.dart @@ -2,4 +2,4 @@ // dart format off /// The generated hash of the `main.css` file. -const generatedStylesHash = ''; +const generatedStylesHash = 'kqT7v0wrEV/S'; diff --git a/src/_includes/docs/get-started/setup-next-steps.html b/src/_includes/docs/get-started/setup-next-steps.html index a43d50c1ad1..c7a27ca0fb9 100644 --- a/src/_includes/docs/get-started/setup-next-steps.html +++ b/src/_includes/docs/get-started/setup-next-steps.html @@ -42,7 +42,7 @@ Write your first app
-
-In this example, there's a row of 3 columns where
-each column contains an icon and a label.
-All layouts, no matter how complex,
-are created by composing these layout widgets.
-
-### Constraints
-
-Understanding constraints in Flutter is an
-important part of understanding
-how layout works in Flutter.
-
-Layout, in a general sense, refers to the size of
-the widgets and their positions on the screen.
-The size and position of any given widget is
-constrained by its parent;
-it can't have any size it wants,
-and it doesn't decide its own place on the screen.
-Instead, size and position are determined by
-a conversation between a widget and its parent.
-
-In the simplest example,
-the layout conversation looks like this:
-
- 1. A widget receives its constraints from its parent.
- 2. A constraint is just a set of 4 doubles:
- a minimum and maximum width,
- and a minimum and maximum height.
- 3. The widget determines what size it should be
- within those constraints, and passes its
- width and height back to the parent.
- 4. The parent looks at the size it wants to be and
- how it should be aligned,
- and sets the widget's position accordingly.
- Alignment can be set explicitly,
- using a variety of widgets like `Center`,
- and the alignment properties on `Row` and `Column`.
-
-In Flutter, this layout conversation is often
-expressed with the simplified phrase,
-"Constraints go down. Sizes go up.
-Parent sets the position."
-
-### Box types
-
-In Flutter, widgets are rendered by their
-underlying [`RenderBox`][] objects.
-These objects determine how to handle the
-constraints they're passed.
-
-Generally, there are three kinds of boxes:
-* Those that try to be as big as possible.
-For example, the boxes used by
-[`Center`][] and [`ListView`][].
-* Those that try to be the same size as their
-children. For example, the boxes used by
-[`Transform`][] and [`Opacity`][]
-* Those that try to be a particular size.
-For example, the boxes used by
-[`Image`][] and [`Text`][].
-
-Some widgets, for example [`Container`][],
-vary from type to type based on their
-constructor arguments.
-The `Container` constructor defaults to trying to
-be as big as possible, but if you give it a width,
-for instance, it tries to honor that and
-be that particular size.
-
-Others, for example [`Row`][] and [`Column`][] (flex boxes)
-vary based on the constraints they are given.
-Read more about flex boxes and constraints in
-the [Understanding Constraints article][].
-
-## Lay out a single widget
-
-To lay out a single widget in Flutter,
-wrap a visible widget,
-such as `Text` or `Image` with a widget that
-can change its position on a screen,
-such as a `Center` widget.
-
-:::note Note
-The examples on the page use a widget called
-`BorderedImage`. This is a custom widget,
-and is used here to hide
-the code that isn't relevant to this topic.
-:::
-
-```dart
-Widget build(BuildContext context) {
- return Center(
- child: BorderedImage(),
- );
-}
-```
-
-The following figure shows a widget that isn't
-aligned on the left,
-and a widget that has been centered on the right.
-
-
-
-All layout widgets have either of the following:
-* A `child` property if they take a single
-child—for example, `Center`, `Container`,
-or `Padding`.
-* A `children` property if they take a list
-of widgets—for example,
-`Row`, `Column`, `ListView`, or `Stack`.
-
-### Container
-
-`Container` is a convenience widget that's
-made up of several widgets responsible for layout,
-painting, positioning, and sizing.
-In regard to layout,
-it can be used to add padding and
-margins to a widget.
-There is also a `Padding` widget
-that could be used here to the same effect.
-The following example uses a `Container`.
-
-```dart
-Widget build(BuildContext context) {
- return Container(
- padding: EdgeInsets.all(16.0),
- child: BorderedImage(),
- );
-}
-```
-
-The following figure shows a widget without
-padding on the left,
-and a widget with padding on the right.
-
-
-
-To create more complex layouts in Flutter,
-you can compose many widgets.
-For example, you can combine `Container` and `Center`:
-
-```dart
-Widget build(BuildContext context) {
- return Center(
- Container(
- padding: EdgeInsets.all(16.0),
- child: BorderedImage(),
- ),
- );
-}
-```
-
-## Layout multiple widgets vertically or horizontally
-
-One of the most common layout patterns is to
-arrange widgets vertically or horizontally.
-You can use a `Row` widget to arrange widgets
-horizontally,
-and a `Column` widget to arrange widgets vertically.
-The first figure on this page used both.
-
-This is the most basic example of using a `Row` widget.
-
-
-
-You control how a row or column aligns its
-children using the `mainAxisAlignment` and
-`crossAxisAlignment` properties.
-For a row, the main axis runs horizontally and
-the cross axis runs vertically. For a column,
-the main axis runs
-vertically and the cross axis runs horizontally.
-
-
-
-Setting the main axis alignment to `spaceEvenly`
-divides the free horizontal space evenly between,
-before, and after each image.
-
-
-
-The [`MainAxisAlignment`][] and [`CrossAxisAlignment`][]
-enums offer a variety of constants for
-controlling alignment.
-
-Flutter includes other widgets that can be used
-for alignment, notably the `Align` widget.
-
-### Sizing widgets within rows and columns
-
-When a layout is too large to fit a device,
-a yellow and black striped pattern appears
-along the affected edge.
-In this example, the viewport is 400 pixels wide,
-and each child is 150 pixels wide.
-
-
-
-Widgets can be sized to fit within a
-row or column by using the `Expanded` widget.
-To fix the previous example where the row of
-images is too wide for its render box,
-wrap each image with an [`Expanded`][] widget.
-
-
-
-
-In the [next page][] in this series, you will
-learn more about layout in Flutter.
-
-### Building widgets
-
-To create a user interface in Flutter,
-you override the [`build`][] method on widget objects.
-All widgets must have a build method,
-and it must return another widget. For example,
-if you want to add text to the screen with some padding,
-you could write it like this:
-
-```dart
-class PaddedText extends StatelessWidget {
- const PaddedText({super.key});
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(8.0),
- child: const Text('Hello, World!'),
- );
- }
-}
-```
-
-The framework calls the `build` method when this
-widget is created and when the dependencies of this
-widget change (such as state that is passed into the widget).
-This method can potentially be called in every frame (typically 60 times a second)
-and should not have any side effects beyond
-building a widget.
-To learn more about how Flutter renders widgets,
-check out the [Flutter architectural overview][].
-
-### Widget state
-
-The framework introduces two major classes of widget:
-stateful and stateless widgets.
-
-Widgets that have no mutable state
-(they have no class properties
-that change over time) subclass [`StatelessWidget`][].
-Many built-in widgets are stateless,
-such as `Padding`, `Text`, and `Icon`.
-When you create your own widgets,
-you'll create `Stateless` widgets most of the time.
-
-On the other hand,
-if the unique characteristics of a widget need to change
-based on user interaction or other factors,
-that widget is stateful.
-For example, if a widget has a counter that
-increments whenever the user taps a button,
-then the value of the counter is the state for that widget.
-When that value changes, the widget needs to be
-rebuilt to update its part of the UI.
-These widgets subclass [`StatefulWidget`][],
-and (because the widget itself is immutable)
-they store mutable state in a separate class that
-subclasses [`State`][].
-`StatefulWidgets` don't have a `build` method;
-instead, their user interface is built through
-their `State` object, as shown in the example below.
-
-```dart
-class CounterWidget extends StatefulWidget {
- @override
- StateUse VS Code or another Code OSS-based editor to quickly - install, set up, and try out Flutter development!
-Install the Flutter SDK, set up any initial target platform, and - get started learning and developing with Flutter!
-Quickly build and run simple single-file Flutter apps on the web.
+Use VS Code or another Code OSS-based editor to quickly + install, set up, and try out Flutter development!
Develop complex Flutter apps in an AI-assisted workspace in the cloud.
+Install the Flutter SDK, set up any initial target platform, and + get started learning and developing with Flutter!
Use VS Code or another Code - OSS derived editor to quickly - set up your Flutter development environment.
+Quickly build and run simple single-file Flutter apps on the web.
Manually install and set up a specific release of the Flutter SDK - for your preferred development environment.
+Develop complex Flutter apps in an AI-assisted workspace in the cloud.
Using Flutter on the command line requires that the Flutter SDK is added to your system's `PATH` environment variable.
+Use this guide to resolve common issues with your Flutter development environment.
+Uninstall Flutter from your system.
+
-
A single feature in your app contains each one of the MVVM components.
In this tutorial, in addition to Flutter widgets,
you'll create `ArticleModel`, `ArticleViewModel`, and `ArticleView`.
diff --git a/src/content/learn/tutorial/layout.md b/src/content/learn/tutorial/layout.md
index 7966750721e..000c802698a 100644
--- a/src/content/learn/tutorial/layout.md
+++ b/src/content/learn/tutorial/layout.md
@@ -229,7 +229,7 @@ providing a declarative alternative to the following:
In this case, it adds five `Row` widgets to the column,
one for each guess on the `Game` object.
-[collection for element]: /language/collections#for-element
+[collection for element]: {{site.dart-site}}/language/collections#for-element
#### An updated widget tree
diff --git a/src/content/llms.txt b/src/content/llms.txt
index a04cded36fa..1c709ebb4ad 100644
--- a/src/content/llms.txt
+++ b/src/content/llms.txt
@@ -10,7 +10,7 @@ This file provides a curated list of resources to help Large Language Models und
- [Installation guide](https://docs.flutter.dev/get-started/install): The first step for any developer to set up their environment for Flutter development.
- [Introduction to declarative UI](https://docs.flutter.dev/get-started/flutter-for/declarative): This introduction describes the conceptual difference between the declarative style used by Flutter, and the imperative style used by many other UI frameworks.
- [Write Your First App Codelab](https://codelabs.developers.google.com/codelabs/flutter-codelab-first): The canonical hands-on tutorial for building a basic Flutter application.
-- [Flutter Fundamentals](https://docs.flutter.dev/get-started/fundamentals): A guide for new developers learning Flutter, covering fundamental topics like Dart, widgets, layout, state
+- [Flutter Learning Pathway](https://docs.flutter.dev/learn/pathway): A guide for new developers learning Flutter, covering fundamental topics like Dart, widgets, layout, state
management, user input, networking, and local data caching.
- [Dart language tour](https://dart.dev/language): A comprehensive introduction to the Dart programming language, which is required for Flutter development.
- [Flutter Widget of the Week playlist](https://www.youtube.com/watch?v=D0xwcz2IqAY&list=PLjxrf2q8roU23XGwz3Km7sQZFTdB996iG): Short, engaging videos introducing individual widgets.
diff --git a/src/content/platform-integration/android/setup.md b/src/content/platform-integration/android/setup.md
index 5045f26946b..14f7b30482e 100644
--- a/src/content/platform-integration/android/setup.md
+++ b/src/content/platform-integration/android/setup.md
@@ -354,7 +354,7 @@ or begin improving integration with Android.
Write your first app