diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index add8c87668..c027a8826d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -33,7 +33,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e + uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -44,7 +44,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e + uses: github/codeql-action/autobuild@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -58,4 +58,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e + uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a diff --git a/examples/animation/animate3/lib/main.dart b/examples/animation/animate3/lib/main.dart index 764e47747b..432896b056 100644 --- a/examples/animation/animate3/lib/main.dart +++ b/examples/animation/animate3/lib/main.dart @@ -65,5 +65,4 @@ class _LogoAppState extends State with SingleTickerProviderStateMixin { // #docregion print-state } - // #enddocregion print-state diff --git a/examples/animation/animate4/lib/main.dart b/examples/animation/animate4/lib/main.dart index 2ca01e3d88..4583fe0440 100644 --- a/examples/animation/animate4/lib/main.dart +++ b/examples/animation/animate4/lib/main.dart @@ -84,5 +84,4 @@ class _LogoAppState extends State with SingleTickerProviderStateMixin { // #docregion print-state } - // #enddocregion print-state diff --git a/examples/animation/animate5/lib/main.dart b/examples/animation/animate5/lib/main.dart index 9bfc7fc234..882fc5565b 100644 --- a/examples/animation/animate5/lib/main.dart +++ b/examples/animation/animate5/lib/main.dart @@ -3,6 +3,7 @@ import 'dart:math'; // #enddocregion ShakeCurve + import 'package:flutter/material.dart'; void main() => runApp(const LogoApp()); @@ -133,5 +134,4 @@ class ShakeCurve extends Curve { @override double transform(double t) => sin(t * pi * 2); } - // #enddocregion ShakeCurve diff --git a/examples/app-architecture/command/lib/main.dart b/examples/app-architecture/command/lib/main.dart index 89646eab51..e3fdf8d9c3 100644 --- a/examples/app-architecture/command/lib/main.dart +++ b/examples/app-architecture/command/lib/main.dart @@ -81,7 +81,6 @@ class _MainAppState extends State { // Show Snackbar } } - // #enddocregion _onViewModelChanged } @@ -175,5 +174,4 @@ class Command extends ChangeNotifier { _completed = false; } } - // #enddocregion Command diff --git a/examples/app-architecture/command/lib/no_command.dart b/examples/app-architecture/command/lib/no_command.dart index 5c4dfe5f01..3fa7a284bf 100644 --- a/examples/app-architecture/command/lib/no_command.dart +++ b/examples/app-architecture/command/lib/no_command.dart @@ -69,7 +69,6 @@ class _MainAppState extends State { // Show Snackbar } } - // #enddocregion _onViewModelChanged } @@ -142,5 +141,4 @@ class HomeViewModel3 extends ChangeNotifier { // edit user } } - // #enddocregion HomeViewModel3 diff --git a/examples/app-architecture/command/lib/simple_command.dart b/examples/app-architecture/command/lib/simple_command.dart index f4cfbe51ab..89519e93e2 100644 --- a/examples/app-architecture/command/lib/simple_command.dart +++ b/examples/app-architecture/command/lib/simple_command.dart @@ -40,5 +40,4 @@ class HomeViewModel extends ChangeNotifier { // load user } } - // #enddocregion ViewModel diff --git a/examples/app-architecture/offline_first/lib/data/repositories/user_profile_repository.dart b/examples/app-architecture/offline_first/lib/data/repositories/user_profile_repository.dart index dfc6f8e940..e6514eb405 100644 --- a/examples/app-architecture/offline_first/lib/data/repositories/user_profile_repository.dart +++ b/examples/app-architecture/offline_first/lib/data/repositories/user_profile_repository.dart @@ -142,6 +142,5 @@ class UserProfileRepository { // Try again later } } - // #enddocregion sync } diff --git a/examples/app-architecture/offline_first/lib/data/services/api_client_service.dart b/examples/app-architecture/offline_first/lib/data/services/api_client_service.dart index 37a1fee508..21d1b9cc64 100644 --- a/examples/app-architecture/offline_first/lib/data/services/api_client_service.dart +++ b/examples/app-architecture/offline_first/lib/data/services/api_client_service.dart @@ -23,5 +23,4 @@ class ApiClientService { // #docregion ApiClientService } } - // #enddocregion ApiClientService diff --git a/examples/app-architecture/offline_first/lib/data/services/database_service.dart b/examples/app-architecture/offline_first/lib/data/services/database_service.dart index ee57db22a4..6eab3d3cae 100644 --- a/examples/app-architecture/offline_first/lib/data/services/database_service.dart +++ b/examples/app-architecture/offline_first/lib/data/services/database_service.dart @@ -24,5 +24,4 @@ class DatabaseService { // #docregion DatabaseService } } - // #enddocregion DatabaseService diff --git a/examples/app-architecture/offline_first/lib/domain/model/user_profile.dart b/examples/app-architecture/offline_first/lib/domain/model/user_profile.dart index 42980661ae..0f216235f3 100644 --- a/examples/app-architecture/offline_first/lib/domain/model/user_profile.dart +++ b/examples/app-architecture/offline_first/lib/domain/model/user_profile.dart @@ -11,5 +11,4 @@ abstract class UserProfile with _$UserProfile { @Default(false) bool synchronized, }) = _UserProfile; } - // #enddocregion UserProfile diff --git a/examples/app-architecture/offline_first/lib/ui/user_profile/user_profile_viewmodel.dart b/examples/app-architecture/offline_first/lib/ui/user_profile/user_profile_viewmodel.dart index 6ec62646d5..9d58e935b8 100644 --- a/examples/app-architecture/offline_first/lib/ui/user_profile/user_profile_viewmodel.dart +++ b/examples/app-architecture/offline_first/lib/ui/user_profile/user_profile_viewmodel.dart @@ -55,5 +55,4 @@ class UserProfileViewModel extends ChangeNotifier { // #docregion UserProfileViewModel } } - // #enddocregion UserProfileViewModel diff --git a/examples/app-architecture/optimistic_state/lib/main.dart b/examples/app-architecture/optimistic_state/lib/main.dart index c44970285c..a1eb48e9ad 100644 --- a/examples/app-architecture/optimistic_state/lib/main.dart +++ b/examples/app-architecture/optimistic_state/lib/main.dart @@ -90,7 +90,6 @@ class _SubscribeButtonState extends State { ).showSnackBar(const SnackBar(content: Text('Failed to subscribe'))); } } - // #enddocregion listener2 } @@ -150,7 +149,6 @@ class SubscribeButtonViewModel extends ChangeNotifier { notifyListeners(); } } - // #enddocregion subscribe } // #enddocregion ViewModelFull @@ -166,5 +164,4 @@ class SubscriptionRepository { throw Exception('Failed to subscribe'); } } - // #enddocregion SubscriptionRepository diff --git a/examples/app-architecture/optimistic_state/lib/starter.dart b/examples/app-architecture/optimistic_state/lib/starter.dart index bbaf07f2f6..91493911e5 100644 --- a/examples/app-architecture/optimistic_state/lib/starter.dart +++ b/examples/app-architecture/optimistic_state/lib/starter.dart @@ -18,5 +18,4 @@ class _SubscribeButtonState extends State { class SubscribeButtonViewModel extends ChangeNotifier {} class SubscriptionRepository {} - // #enddocregion Starter diff --git a/examples/app-architecture/result/lib/main.dart b/examples/app-architecture/result/lib/main.dart index d0f9b56b2c..2fb3b72cb4 100644 --- a/examples/app-architecture/result/lib/main.dart +++ b/examples/app-architecture/result/lib/main.dart @@ -68,7 +68,6 @@ class UserProfileRepository { return Result.error(Exception('Failed to get user profile')); } - // #enddocregion getUserProfile } diff --git a/examples/app-architecture/result/lib/result.dart b/examples/app-architecture/result/lib/result.dart index 4ec69de2ea..c405dc0936 100644 --- a/examples/app-architecture/result/lib/result.dart +++ b/examples/app-architecture/result/lib/result.dart @@ -55,5 +55,4 @@ final class Error extends Result { @override String toString() => 'Result<$T>.error($error)'; } - // #enddocregion Result diff --git a/examples/app-architecture/todo_data_service/lib/business/model/todo.dart b/examples/app-architecture/todo_data_service/lib/business/model/todo.dart index 1ba0917827..01e41297d3 100644 --- a/examples/app-architecture/todo_data_service/lib/business/model/todo.dart +++ b/examples/app-architecture/todo_data_service/lib/business/model/todo.dart @@ -13,5 +13,4 @@ abstract class Todo with _$Todo { required String task, }) = _Todo; } - // #enddocregion Todo diff --git a/examples/app-architecture/todo_data_service/lib/data/repositories/theme_repository.dart b/examples/app-architecture/todo_data_service/lib/data/repositories/theme_repository.dart index 8655246da2..0fff6bae69 100644 --- a/examples/app-architecture/todo_data_service/lib/data/repositories/theme_repository.dart +++ b/examples/app-architecture/todo_data_service/lib/data/repositories/theme_repository.dart @@ -38,5 +38,4 @@ class ThemeRepository { /// ViewModels should call [isDarkMode] to get the current theme setting. Stream observeDarkMode() => _darkModeController.stream; } - // #enddocregion ThemeRepository diff --git a/examples/app-architecture/todo_data_service/lib/data/repositories/todo_repository.dart b/examples/app-architecture/todo_data_service/lib/data/repositories/todo_repository.dart index d836daa205..b07926b5c9 100644 --- a/examples/app-architecture/todo_data_service/lib/data/repositories/todo_repository.dart +++ b/examples/app-architecture/todo_data_service/lib/data/repositories/todo_repository.dart @@ -29,5 +29,4 @@ class TodoRepository { return _database.delete(id); } } - // #enddocregion TodoRepository diff --git a/examples/app-architecture/todo_data_service/lib/data/services/shared_preferences_service.dart b/examples/app-architecture/todo_data_service/lib/data/services/shared_preferences_service.dart index 788da06880..af9d775df0 100644 --- a/examples/app-architecture/todo_data_service/lib/data/services/shared_preferences_service.dart +++ b/examples/app-architecture/todo_data_service/lib/data/services/shared_preferences_service.dart @@ -14,5 +14,4 @@ class SharedPreferencesService { return prefs.getBool(_kDarkMode) ?? false; } } - // #enddocregion SharedPreferencesService diff --git a/examples/app-architecture/todo_data_service/lib/main_app_viewmodel.dart b/examples/app-architecture/todo_data_service/lib/main_app_viewmodel.dart index 70a2cce200..c596a1db36 100644 --- a/examples/app-architecture/todo_data_service/lib/main_app_viewmodel.dart +++ b/examples/app-architecture/todo_data_service/lib/main_app_viewmodel.dart @@ -37,5 +37,4 @@ class MainAppViewModel extends ChangeNotifier { super.dispose(); } } - // #enddocregion MainAppViewModel diff --git a/examples/app-architecture/todo_data_service/lib/ui/theme_config/viewmodel/theme_switch_viewmodel.dart b/examples/app-architecture/todo_data_service/lib/ui/theme_config/viewmodel/theme_switch_viewmodel.dart index 072d08919a..87126d6f71 100644 --- a/examples/app-architecture/todo_data_service/lib/ui/theme_config/viewmodel/theme_switch_viewmodel.dart +++ b/examples/app-architecture/todo_data_service/lib/ui/theme_config/viewmodel/theme_switch_viewmodel.dart @@ -42,5 +42,4 @@ class ThemeSwitchViewModel extends ChangeNotifier { return result; } } - // #enddocregion ThemeSwitchViewModel diff --git a/examples/app-architecture/todo_data_service/lib/ui/theme_config/widgets/theme_switch.dart b/examples/app-architecture/todo_data_service/lib/ui/theme_config/widgets/theme_switch.dart index 7ce7f1a9ac..d1bc5d0a6c 100644 --- a/examples/app-architecture/todo_data_service/lib/ui/theme_config/widgets/theme_switch.dart +++ b/examples/app-architecture/todo_data_service/lib/ui/theme_config/widgets/theme_switch.dart @@ -30,5 +30,4 @@ class ThemeSwitch extends StatelessWidget { ); } } - // #enddocregion ThemeSwitch diff --git a/examples/app-architecture/todo_data_service/lib/ui/todo_list/viewmodel/todo_list_viewmodel.dart b/examples/app-architecture/todo_data_service/lib/ui/todo_list/viewmodel/todo_list_viewmodel.dart index e76dd81d99..12c0e9d309 100644 --- a/examples/app-architecture/todo_data_service/lib/ui/todo_list/viewmodel/todo_list_viewmodel.dart +++ b/examples/app-architecture/todo_data_service/lib/ui/todo_list/viewmodel/todo_list_viewmodel.dart @@ -82,6 +82,5 @@ class TodoListViewModel extends ChangeNotifier { notifyListeners(); } } - // #enddocregion Delete } diff --git a/examples/app-architecture/todo_data_service/lib/ui/todo_list/widgets/todo_list_screen.dart b/examples/app-architecture/todo_data_service/lib/ui/todo_list/widgets/todo_list_screen.dart index 5f83c38624..4ef5d63769 100644 --- a/examples/app-architecture/todo_data_service/lib/ui/todo_list/widgets/todo_list_screen.dart +++ b/examples/app-architecture/todo_data_service/lib/ui/todo_list/widgets/todo_list_screen.dart @@ -93,6 +93,5 @@ class _TodoListScreenState extends State { _controller.clear(); } } - // #enddocregion Add } diff --git a/examples/cookbook/animation/animated_container/lib/starter.dart b/examples/cookbook/animation/animated_container/lib/starter.dart index 91312df57c..7e94cae4e9 100644 --- a/examples/cookbook/animation/animated_container/lib/starter.dart +++ b/examples/cookbook/animation/animated_container/lib/starter.dart @@ -23,5 +23,4 @@ class _AnimatedContainerAppState extends State { return Container(); } } - // #enddocregion Starter diff --git a/examples/cookbook/animation/opacity_animation/lib/starter.dart b/examples/cookbook/animation/opacity_animation/lib/starter.dart index 8d497893a8..a3eaa972a1 100644 --- a/examples/cookbook/animation/opacity_animation/lib/starter.dart +++ b/examples/cookbook/animation/opacity_animation/lib/starter.dart @@ -1,6 +1,6 @@ +// ignore_for_file: prefer_final_fields, unused_field + import 'package:flutter/material.dart'; -// ignore_for_file: prefer_final_fields -// ignore_for_file: unused_field // #docregion Starter // The StatefulWidget's job is to take data and create a State class. @@ -26,5 +26,4 @@ class _MyHomePageState extends State { return Container(); } } - // #enddocregion Starter diff --git a/examples/cookbook/animation/physics_simulation/lib/main.dart b/examples/cookbook/animation/physics_simulation/lib/main.dart index 67f542bb2a..5c31247ac9 100644 --- a/examples/cookbook/animation/physics_simulation/lib/main.dart +++ b/examples/cookbook/animation/physics_simulation/lib/main.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; // #docregion import import 'package:flutter/physics.dart'; + // #enddocregion import void main() { diff --git a/examples/cookbook/animation/physics_simulation/lib/step1.dart b/examples/cookbook/animation/physics_simulation/lib/step1.dart index 412280b2a4..455983e294 100644 --- a/examples/cookbook/animation/physics_simulation/lib/step1.dart +++ b/examples/cookbook/animation/physics_simulation/lib/step1.dart @@ -51,6 +51,5 @@ class _DraggableCardState extends State Widget build(BuildContext context) { return Align(child: Card(child: widget.child)); } - // #enddocregion build } diff --git a/examples/cookbook/animation/physics_simulation/lib/step2.dart b/examples/cookbook/animation/physics_simulation/lib/step2.dart index f9e3e7a911..6cc866b180 100644 --- a/examples/cookbook/animation/physics_simulation/lib/step2.dart +++ b/examples/cookbook/animation/physics_simulation/lib/step2.dart @@ -74,6 +74,5 @@ class _DraggableCardState extends State ); // #enddocregion gesture } - // #enddocregion build } diff --git a/examples/cookbook/animation/physics_simulation/lib/step3.dart b/examples/cookbook/animation/physics_simulation/lib/step3.dart index 92637e3e9d..5208761055 100644 --- a/examples/cookbook/animation/physics_simulation/lib/step3.dart +++ b/examples/cookbook/animation/physics_simulation/lib/step3.dart @@ -92,6 +92,5 @@ class _DraggableCardState extends State _controller.reset(); _controller.forward(); } - // #enddocregion runAnimation } diff --git a/examples/cookbook/design/orientation/lib/orientation.dart b/examples/cookbook/design/orientation/lib/orientation.dart index 5e8d7b1ed0..62f365f9ad 100644 --- a/examples/cookbook/design/orientation/lib/orientation.dart +++ b/examples/cookbook/design/orientation/lib/orientation.dart @@ -9,5 +9,4 @@ void main() { SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); runApp(const MyApp()); } - // #enddocregion PreferredOrientations diff --git a/examples/cookbook/effects/download_button/lib/button_taps.dart b/examples/cookbook/effects/download_button/lib/button_taps.dart index 4e532133ac..51dbb1158e 100644 --- a/examples/cookbook/effects/download_button/lib/button_taps.dart +++ b/examples/cookbook/effects/download_button/lib/button_taps.dart @@ -151,5 +151,4 @@ class DownloadButton extends StatelessWidget { ); } } - // #enddocregion TapCallbacks diff --git a/examples/cookbook/effects/download_button/lib/display.dart b/examples/cookbook/effects/download_button/lib/display.dart index ffec2b0ed1..a0be8eb5ed 100644 --- a/examples/cookbook/effects/download_button/lib/display.dart +++ b/examples/cookbook/effects/download_button/lib/display.dart @@ -71,5 +71,4 @@ class ButtonShapeWidget extends StatelessWidget { ); } } - // #enddocregion Display diff --git a/examples/cookbook/effects/download_button/lib/display_text.dart b/examples/cookbook/effects/download_button/lib/display_text.dart index bd4d336459..81be9a722c 100644 --- a/examples/cookbook/effects/download_button/lib/display_text.dart +++ b/examples/cookbook/effects/download_button/lib/display_text.dart @@ -56,5 +56,4 @@ class ButtonShapeWidget extends StatelessWidget { ); } } - // #enddocregion DisplayText diff --git a/examples/cookbook/effects/download_button/lib/spinner.dart b/examples/cookbook/effects/download_button/lib/spinner.dart index 804f39e51c..75d1b9a886 100644 --- a/examples/cookbook/effects/download_button/lib/spinner.dart +++ b/examples/cookbook/effects/download_button/lib/spinner.dart @@ -147,6 +147,5 @@ class DownloadButton extends StatelessWidget { ), ); } - // #enddocregion Spinner } diff --git a/examples/cookbook/effects/download_button/lib/stateful_widget.dart b/examples/cookbook/effects/download_button/lib/stateful_widget.dart index 03717eaf49..32dab5b187 100644 --- a/examples/cookbook/effects/download_button/lib/stateful_widget.dart +++ b/examples/cookbook/effects/download_button/lib/stateful_widget.dart @@ -11,5 +11,4 @@ class DownloadButton extends StatelessWidget { return const SizedBox(); } } - // #enddocregion DownloadButton diff --git a/examples/cookbook/effects/download_button/lib/stop.dart b/examples/cookbook/effects/download_button/lib/stop.dart index 625a283ff0..682a93c7bd 100644 --- a/examples/cookbook/effects/download_button/lib/stop.dart +++ b/examples/cookbook/effects/download_button/lib/stop.dart @@ -158,6 +158,5 @@ class DownloadButton extends StatelessWidget { ), ); } - // #enddocregion StopIcon } diff --git a/examples/cookbook/effects/download_button/lib/visual_states.dart b/examples/cookbook/effects/download_button/lib/visual_states.dart index cb7de960ea..5cf96d96fe 100644 --- a/examples/cookbook/effects/download_button/lib/visual_states.dart +++ b/examples/cookbook/effects/download_button/lib/visual_states.dart @@ -20,5 +20,4 @@ class DownloadButton extends StatelessWidget { return const SizedBox(); } } - // #enddocregion VisualStates diff --git a/examples/cookbook/effects/drag_a_widget/lib/main.dart b/examples/cookbook/effects/drag_a_widget/lib/main.dart index 5d81e90e36..a7bc92340a 100644 --- a/examples/cookbook/effects/drag_a_widget/lib/main.dart +++ b/examples/cookbook/effects/drag_a_widget/lib/main.dart @@ -389,5 +389,4 @@ class Customer { return '\$${(totalPriceCents / 100.0).toStringAsFixed(2)}'; } } - // #enddocregion CustomerClass diff --git a/examples/cookbook/effects/expandable_fab/lib/excerpt1.dart b/examples/cookbook/effects/expandable_fab/lib/excerpt1.dart index 30ebde9eda..ca4b2eb104 100644 --- a/examples/cookbook/effects/expandable_fab/lib/excerpt1.dart +++ b/examples/cookbook/effects/expandable_fab/lib/excerpt1.dart @@ -24,5 +24,4 @@ class _ExpandableFabState extends State { return const SizedBox(); } } - // #enddocregion ExpandableFab diff --git a/examples/cookbook/effects/expandable_fab/lib/excerpt2.dart b/examples/cookbook/effects/expandable_fab/lib/excerpt2.dart index b68fa8a3af..62ecff52a1 100644 --- a/examples/cookbook/effects/expandable_fab/lib/excerpt2.dart +++ b/examples/cookbook/effects/expandable_fab/lib/excerpt2.dart @@ -90,5 +90,4 @@ class _ExpandableFabState extends State { ); } } - // #enddocregion ExpandableFabState diff --git a/examples/cookbook/effects/nested_nav/lib/prompt_user.dart b/examples/cookbook/effects/nested_nav/lib/prompt_user.dart index 11e04061ab..00bb92fde1 100644 --- a/examples/cookbook/effects/nested_nav/lib/prompt_user.dart +++ b/examples/cookbook/effects/nested_nav/lib/prompt_user.dart @@ -86,6 +86,5 @@ class SetupFlowState extends State { title: const Text('Bulb Setup'), ); } - // #enddocregion PromptUser } diff --git a/examples/cookbook/effects/nested_nav/lib/setupflow.dart b/examples/cookbook/effects/nested_nav/lib/setupflow.dart index 791595f0d7..6c8a88217b 100644 --- a/examples/cookbook/effects/nested_nav/lib/setupflow.dart +++ b/examples/cookbook/effects/nested_nav/lib/setupflow.dart @@ -16,5 +16,4 @@ class SetupFlowState extends State { return const SizedBox(); } } - // #enddocregion SetupFlow diff --git a/examples/cookbook/effects/nested_nav/lib/setupflow2.dart b/examples/cookbook/effects/nested_nav/lib/setupflow2.dart index b636692c52..18d8f01a07 100644 --- a/examples/cookbook/effects/nested_nav/lib/setupflow2.dart +++ b/examples/cookbook/effects/nested_nav/lib/setupflow2.dart @@ -19,6 +19,5 @@ class SetupFlowState extends State { PreferredSizeWidget _buildFlowAppBar() { return AppBar(title: const Text('Bulb Setup')); } - // #enddocregion SetupFlow2 } diff --git a/examples/cookbook/effects/parallax_scrolling/lib/excerpt1.dart b/examples/cookbook/effects/parallax_scrolling/lib/excerpt1.dart index 38778b82d0..a73863262a 100644 --- a/examples/cookbook/effects/parallax_scrolling/lib/excerpt1.dart +++ b/examples/cookbook/effects/parallax_scrolling/lib/excerpt1.dart @@ -9,5 +9,4 @@ class ParallaxRecipe extends StatelessWidget { return const SingleChildScrollView(child: Column(children: [])); } } - // #enddocregion ParallaxRecipe diff --git a/examples/cookbook/effects/parallax_scrolling/lib/excerpt2.dart b/examples/cookbook/effects/parallax_scrolling/lib/excerpt2.dart index 0ff4d5773a..769895dbbf 100644 --- a/examples/cookbook/effects/parallax_scrolling/lib/excerpt2.dart +++ b/examples/cookbook/effects/parallax_scrolling/lib/excerpt2.dart @@ -78,5 +78,4 @@ class LocationListItem extends StatelessWidget { ); } } - // #enddocregion LocationListItem diff --git a/examples/cookbook/effects/parallax_scrolling/lib/main.dart b/examples/cookbook/effects/parallax_scrolling/lib/main.dart index f523039ff6..9727fd49f0 100644 --- a/examples/cookbook/effects/parallax_scrolling/lib/main.dart +++ b/examples/cookbook/effects/parallax_scrolling/lib/main.dart @@ -134,7 +134,6 @@ class ParallaxFlowDelegate extends FlowDelegate { required this.listItemContext, required this.backgroundImageKey, }) : super(repaint: scrollable.position); - // #enddocregion SuperScrollPosition final ScrollableState scrollable; @@ -197,7 +196,6 @@ class ParallaxFlowDelegate extends FlowDelegate { listItemContext != oldDelegate.listItemContext || backgroundImageKey != oldDelegate.backgroundImageKey; } - // #enddocregion ShouldRepaint } diff --git a/examples/cookbook/effects/shimmer_loading/lib/main.dart b/examples/cookbook/effects/shimmer_loading/lib/main.dart index d6476db552..097fe87c61 100644 --- a/examples/cookbook/effects/shimmer_loading/lib/main.dart +++ b/examples/cookbook/effects/shimmer_loading/lib/main.dart @@ -191,5 +191,4 @@ class _ExampleUiLoadingAnimationState extends State { ); } } - // #enddocregion ExampleUiAnimationState diff --git a/examples/cookbook/effects/shimmer_loading/lib/shimmer_state.dart b/examples/cookbook/effects/shimmer_loading/lib/shimmer_state.dart index 5734da06b7..518ae719b1 100644 --- a/examples/cookbook/effects/shimmer_loading/lib/shimmer_state.dart +++ b/examples/cookbook/effects/shimmer_loading/lib/shimmer_state.dart @@ -41,5 +41,4 @@ class ShimmerState extends State { return widget.child ?? const SizedBox(); } } - // #enddocregion ShimmerState diff --git a/examples/cookbook/effects/staggered_menu_animation/lib/animation_delays.dart b/examples/cookbook/effects/staggered_menu_animation/lib/animation_delays.dart index 4ffda0e059..e88a906076 100644 --- a/examples/cookbook/effects/staggered_menu_animation/lib/animation_delays.dart +++ b/examples/cookbook/effects/staggered_menu_animation/lib/animation_delays.dart @@ -38,5 +38,4 @@ class _MenuState extends State with SingleTickerProviderStateMixin { // #docregion delays } - // #enddocregion delays diff --git a/examples/cookbook/effects/staggered_menu_animation/lib/step1.dart b/examples/cookbook/effects/staggered_menu_animation/lib/step1.dart index a2be1efcdd..781b81c35a 100644 --- a/examples/cookbook/effects/staggered_menu_animation/lib/step1.dart +++ b/examples/cookbook/effects/staggered_menu_animation/lib/step1.dart @@ -83,5 +83,4 @@ class _MenuState extends State { ); } } - // #enddocregion step1 diff --git a/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart b/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart index 58e7a4a5f2..08798d9dad 100644 --- a/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart +++ b/examples/cookbook/effects/staggered_menu_animation/lib/step2.dart @@ -32,5 +32,4 @@ class _MenuState extends State with SingleTickerProviderStateMixin { // #docregion animation-controller } - // #enddocregion animation-controller diff --git a/examples/cookbook/effects/staggered_menu_animation/lib/step3.dart b/examples/cookbook/effects/staggered_menu_animation/lib/step3.dart index 310d2993d2..dde6b473d4 100644 --- a/examples/cookbook/effects/staggered_menu_animation/lib/step3.dart +++ b/examples/cookbook/effects/staggered_menu_animation/lib/step3.dart @@ -74,5 +74,4 @@ class _MenuState extends State with SingleTickerProviderStateMixin { ]; // #docregion step3 } - // #enddocregion step3 diff --git a/examples/cookbook/effects/staggered_menu_animation/lib/step4.dart b/examples/cookbook/effects/staggered_menu_animation/lib/step4.dart index 4a78dcc454..617d104b95 100644 --- a/examples/cookbook/effects/staggered_menu_animation/lib/step4.dart +++ b/examples/cookbook/effects/staggered_menu_animation/lib/step4.dart @@ -156,6 +156,5 @@ class _MenuState extends State with SingleTickerProviderStateMixin { ), ); } - // #enddocregion build-get-started } diff --git a/examples/cookbook/forms/focus/lib/starter.dart b/examples/cookbook/forms/focus/lib/starter.dart index 61ae8dfd41..6273b19ccf 100644 --- a/examples/cookbook/forms/focus/lib/starter.dart +++ b/examples/cookbook/forms/focus/lib/starter.dart @@ -37,5 +37,4 @@ class _MyCustomFormState extends State { return Container(); } } - // #enddocregion Starter diff --git a/examples/cookbook/forms/focus/lib/step2.dart b/examples/cookbook/forms/focus/lib/step2.dart index 6d7ccf5bd7..2e32c1d543 100644 --- a/examples/cookbook/forms/focus/lib/step2.dart +++ b/examples/cookbook/forms/focus/lib/step2.dart @@ -35,6 +35,5 @@ class _MyCustomFormState extends State { Widget build(BuildContext context) { return TextField(focusNode: myFocusNode); } - // #enddocregion Build } diff --git a/examples/cookbook/forms/retrieve_input/lib/starter.dart b/examples/cookbook/forms/retrieve_input/lib/starter.dart index dbe6fca8a2..982f212649 100644 --- a/examples/cookbook/forms/retrieve_input/lib/starter.dart +++ b/examples/cookbook/forms/retrieve_input/lib/starter.dart @@ -29,5 +29,4 @@ class _MyCustomFormState extends State { return Container(); } } - // #enddocregion Starter diff --git a/examples/cookbook/forms/text_field_changes/lib/main_step1.dart b/examples/cookbook/forms/text_field_changes/lib/main_step1.dart index 239d17a414..52e6e7d2f0 100644 --- a/examples/cookbook/forms/text_field_changes/lib/main_step1.dart +++ b/examples/cookbook/forms/text_field_changes/lib/main_step1.dart @@ -30,5 +30,4 @@ class _MyCustomFormState extends State { return Container(); } } - // #enddocregion Step1 diff --git a/examples/cookbook/games/firestore_multiplayer/lib/main.dart b/examples/cookbook/games/firestore_multiplayer/lib/main.dart index ff6c9fbd17..ecd3743a1c 100644 --- a/examples/cookbook/games/firestore_multiplayer/lib/main.dart +++ b/examples/cookbook/games/firestore_multiplayer/lib/main.dart @@ -8,6 +8,7 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_core/firebase_core.dart'; import 'firebase_options.dart'; + // #enddocregion imports void main() async { diff --git a/examples/cookbook/games/firestore_multiplayer/lib/play_session/play_session_screen.dart b/examples/cookbook/games/firestore_multiplayer/lib/play_session/play_session_screen.dart index 36656caf09..3533649efe 100644 --- a/examples/cookbook/games/firestore_multiplayer/lib/play_session/play_session_screen.dart +++ b/examples/cookbook/games/firestore_multiplayer/lib/play_session/play_session_screen.dart @@ -9,6 +9,7 @@ import '../game_internals/board_state.dart'; // #docregion imports import 'package:cloud_firestore/cloud_firestore.dart'; import '../multiplayer/firestore_controller.dart'; + // #enddocregion imports class PlaySessionScreen extends StatefulWidget { diff --git a/examples/cookbook/lists/mixed_list/lib/main.dart b/examples/cookbook/lists/mixed_list/lib/main.dart index 8a69579ff5..5994208dea 100644 --- a/examples/cookbook/lists/mixed_list/lib/main.dart +++ b/examples/cookbook/lists/mixed_list/lib/main.dart @@ -87,5 +87,4 @@ class MessageItem implements ListItem { @override Widget buildSubtitle(BuildContext context) => Text(body); } - // #enddocregion ListItem diff --git a/examples/cookbook/navigation/navigate_with_arguments/lib/main.dart b/examples/cookbook/navigation/navigate_with_arguments/lib/main.dart index 1d9303ec2d..315b05c626 100644 --- a/examples/cookbook/navigation/navigate_with_arguments/lib/main.dart +++ b/examples/cookbook/navigation/navigate_with_arguments/lib/main.dart @@ -179,5 +179,4 @@ class ScreenArguments { ScreenArguments(this.title, this.message); } - // #enddocregion ScreenArguments diff --git a/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart b/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart index f2c438d744..f9885a5022 100644 --- a/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart +++ b/examples/cookbook/navigation/navigation_basics/lib/main_step1.dart @@ -38,5 +38,4 @@ class SecondRoute extends StatelessWidget { ); } } - // #enddocregion first-second-routes diff --git a/examples/cookbook/navigation/navigation_basics/lib/main_step1_cupertino.dart b/examples/cookbook/navigation/navigation_basics/lib/main_step1_cupertino.dart index e4e79166c9..6ec1a9f77c 100644 --- a/examples/cookbook/navigation/navigation_basics/lib/main_step1_cupertino.dart +++ b/examples/cookbook/navigation/navigation_basics/lib/main_step1_cupertino.dart @@ -38,5 +38,4 @@ class SecondRoute extends StatelessWidget { ); } } - // #enddocregion first-second-routes diff --git a/examples/cookbook/navigation/passing_data/lib/main.dart b/examples/cookbook/navigation/passing_data/lib/main.dart index de929670fc..e1eb5269b0 100644 --- a/examples/cookbook/navigation/passing_data/lib/main.dart +++ b/examples/cookbook/navigation/passing_data/lib/main.dart @@ -82,5 +82,4 @@ class DetailScreen extends StatelessWidget { ); } } - // #enddocregion detail diff --git a/examples/cookbook/navigation/passing_data/lib/main_routesettings.dart b/examples/cookbook/navigation/passing_data/lib/main_routesettings.dart index 82cf860192..4a84f5a3ca 100644 --- a/examples/cookbook/navigation/passing_data/lib/main_routesettings.dart +++ b/examples/cookbook/navigation/passing_data/lib/main_routesettings.dart @@ -79,5 +79,4 @@ class DetailScreen extends StatelessWidget { ); } } - // #enddocregion DetailScreen diff --git a/examples/cookbook/navigation/passing_data/lib/main_todoscreen.dart b/examples/cookbook/navigation/passing_data/lib/main_todoscreen.dart index 16b6838130..8e41643a5c 100644 --- a/examples/cookbook/navigation/passing_data/lib/main_todoscreen.dart +++ b/examples/cookbook/navigation/passing_data/lib/main_todoscreen.dart @@ -30,5 +30,4 @@ class TodosScreen extends StatelessWidget { ); } } - // #enddocregion TodosScreen diff --git a/examples/cookbook/navigation/returning_data/lib/main.dart b/examples/cookbook/navigation/returning_data/lib/main.dart index 94f515a67a..2f18043320 100644 --- a/examples/cookbook/navigation/returning_data/lib/main.dart +++ b/examples/cookbook/navigation/returning_data/lib/main.dart @@ -55,7 +55,6 @@ class _SelectionButtonState extends State { ..removeCurrentSnackBar() ..showSnackBar(SnackBar(content: Text('$result'))); } - // #enddocregion navigateAndDisplay } diff --git a/examples/cookbook/navigation/returning_data/lib/main_step2.dart b/examples/cookbook/navigation/returning_data/lib/main_step2.dart index a3b10990e7..48fe627694 100644 --- a/examples/cookbook/navigation/returning_data/lib/main_step2.dart +++ b/examples/cookbook/navigation/returning_data/lib/main_step2.dart @@ -1,6 +1,7 @@ -import 'package:flutter/material.dart'; // ignore_for_file: unused_local_variable +import 'package:flutter/material.dart'; + void main() { runApp(const MaterialApp(title: 'Returning Data', home: HomeScreen())); } @@ -91,5 +92,4 @@ class SelectionScreen extends StatelessWidget { ); } } - // #enddocregion SelectionScreen diff --git a/examples/cookbook/networking/background_parsing/lib/main_step2.dart b/examples/cookbook/networking/background_parsing/lib/main_step2.dart index f4f233ae39..5975a74683 100644 --- a/examples/cookbook/networking/background_parsing/lib/main_step2.dart +++ b/examples/cookbook/networking/background_parsing/lib/main_step2.dart @@ -6,5 +6,4 @@ import 'package:http/http.dart' as http; Future fetchPhotos(http.Client client) async { return client.get(Uri.parse('https://jsonplaceholder.typicode.com/photos')); } - // #enddocregion fetchPhotos diff --git a/examples/cookbook/networking/background_parsing/lib/main_step3.dart b/examples/cookbook/networking/background_parsing/lib/main_step3.dart index b9216c58ac..a9f2d52613 100644 --- a/examples/cookbook/networking/background_parsing/lib/main_step3.dart +++ b/examples/cookbook/networking/background_parsing/lib/main_step3.dart @@ -48,5 +48,4 @@ class Photo { ); } } - // #enddocregion Photo diff --git a/examples/cookbook/networking/delete_data/lib/main.dart b/examples/cookbook/networking/delete_data/lib/main.dart index 1647cddd4a..3193650648 100644 --- a/examples/cookbook/networking/delete_data/lib/main.dart +++ b/examples/cookbook/networking/delete_data/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; // #docregion Http import 'package:http/http.dart' as http; + // #enddocregion Http Future fetchAlbum() async { diff --git a/examples/cookbook/networking/delete_data/lib/main_step1.dart b/examples/cookbook/networking/delete_data/lib/main_step1.dart index 917c650e85..3b1e260a1a 100644 --- a/examples/cookbook/networking/delete_data/lib/main_step1.dart +++ b/examples/cookbook/networking/delete_data/lib/main_step1.dart @@ -13,5 +13,4 @@ Future deleteAlbum(String id) async { return response; } - // #enddocregion deleteAlbum diff --git a/examples/cookbook/networking/fetch_data/lib/main.dart b/examples/cookbook/networking/fetch_data/lib/main.dart index 7359e87703..d5bbce9318 100644 --- a/examples/cookbook/networking/fetch_data/lib/main.dart +++ b/examples/cookbook/networking/fetch_data/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; // #docregion Http import 'package:http/http.dart' as http; + // #enddocregion Http // #docregion fetchAlbum @@ -98,5 +99,4 @@ class _MyAppState extends State { // #docregion State } - // #enddocregion State diff --git a/examples/cookbook/networking/fetch_data/lib/main_step1.dart b/examples/cookbook/networking/fetch_data/lib/main_step1.dart index a56bb0b294..54ef193e3c 100644 --- a/examples/cookbook/networking/fetch_data/lib/main_step1.dart +++ b/examples/cookbook/networking/fetch_data/lib/main_step1.dart @@ -6,5 +6,4 @@ import 'package:http/http.dart' as http; Future fetchAlbum() { return http.get(Uri.parse('https://jsonplaceholder.typicode.com/albums/1')); } - // #enddocregion fetchAlbum diff --git a/examples/cookbook/networking/send_data/lib/create_album.dart b/examples/cookbook/networking/send_data/lib/create_album.dart index c0e1b9fc53..97a29d3401 100644 --- a/examples/cookbook/networking/send_data/lib/create_album.dart +++ b/examples/cookbook/networking/send_data/lib/create_album.dart @@ -14,5 +14,4 @@ Future createAlbum(String title) { body: jsonEncode({'title': title}), ); } - // #enddocregion CreateAlbum diff --git a/examples/cookbook/networking/send_data/lib/main.dart b/examples/cookbook/networking/send_data/lib/main.dart index 598707c228..68d03c87a7 100644 --- a/examples/cookbook/networking/send_data/lib/main.dart +++ b/examples/cookbook/networking/send_data/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; // #docregion Http import 'package:http/http.dart' as http; + // #enddocregion Http // #docregion createAlbum diff --git a/examples/cookbook/networking/update_data/lib/main.dart b/examples/cookbook/networking/update_data/lib/main.dart index 734d6ff368..1b7a9e824f 100644 --- a/examples/cookbook/networking/update_data/lib/main.dart +++ b/examples/cookbook/networking/update_data/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; // #docregion Http import 'package:http/http.dart' as http; + // #enddocregion Http // #docregion fetchAlbum diff --git a/examples/cookbook/networking/update_data/lib/main_step2.dart b/examples/cookbook/networking/update_data/lib/main_step2.dart index 8c39c4c022..460bf637b8 100644 --- a/examples/cookbook/networking/update_data/lib/main_step2.dart +++ b/examples/cookbook/networking/update_data/lib/main_step2.dart @@ -13,5 +13,4 @@ Future updateAlbum(String title) { body: jsonEncode({'title': title}), ); } - // #enddocregion updateAlbum diff --git a/examples/cookbook/persistence/reading_writing_files/lib/main.dart b/examples/cookbook/persistence/reading_writing_files/lib/main.dart index 057b9a47a6..9de5db1db5 100644 --- a/examples/cookbook/persistence/reading_writing_files/lib/main.dart +++ b/examples/cookbook/persistence/reading_writing_files/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; // #docregion localPath import 'package:path_provider/path_provider.dart'; + // #enddocregion localPath void main() { @@ -54,7 +55,6 @@ class CounterStorage { // Write the file return file.writeAsString('$counter'); } - // #enddocregion writeCounter } diff --git a/examples/cookbook/persistence/sqlite/lib/main.dart b/examples/cookbook/persistence/sqlite/lib/main.dart index bdea21d5e3..cba9676129 100644 --- a/examples/cookbook/persistence/sqlite/lib/main.dart +++ b/examples/cookbook/persistence/sqlite/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:path/path.dart'; import 'package:sqflite/sqflite.dart'; + // #enddocregion imports void main() async { @@ -148,5 +149,4 @@ class Dog { return 'Dog{id: $id, name: $name, age: $age}'; } } - // #enddocregion Dog diff --git a/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart b/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart index 21544d578f..1ffbafeb2e 100644 --- a/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart +++ b/examples/cookbook/plugins/google_mobile_ads/lib/my_banner_ad.dart @@ -88,6 +88,5 @@ class _MyBannerAdWidgetState extends State { // Start loading. bannerAd.load(); } - // #enddocregion loadAd } diff --git a/examples/cookbook/plugins/picture_using_camera/lib/main_step3.dart b/examples/cookbook/plugins/picture_using_camera/lib/main_step3.dart index 7e8fb179c7..48220a3f84 100644 --- a/examples/cookbook/plugins/picture_using_camera/lib/main_step3.dart +++ b/examples/cookbook/plugins/picture_using_camera/lib/main_step3.dart @@ -70,5 +70,4 @@ class TakePictureScreenState extends State { return Container(); } } - // #enddocregion controller diff --git a/examples/cookbook/plugins/play_video/lib/main_step3.dart b/examples/cookbook/plugins/play_video/lib/main_step3.dart index a017cdda1f..eff4735930 100644 --- a/examples/cookbook/plugins/play_video/lib/main_step3.dart +++ b/examples/cookbook/plugins/play_video/lib/main_step3.dart @@ -45,5 +45,4 @@ class _VideoPlayerScreenState extends State { return Container(); } } - // #enddocregion VideoPlayerScreen diff --git a/examples/cookbook/testing/integration/introduction/integration_test/app_test.dart b/examples/cookbook/testing/integration/introduction/integration_test/app_test.dart index a8b68ed7cd..6ec07529eb 100644 --- a/examples/cookbook/testing/integration/introduction/integration_test/app_test.dart +++ b/examples/cookbook/testing/integration/introduction/integration_test/app_test.dart @@ -31,5 +31,4 @@ void main() { }); }); } - // #enddocregion integration-test diff --git a/examples/cookbook/testing/integration/profiling/integration_test/scrolling_test.dart b/examples/cookbook/testing/integration/profiling/integration_test/scrolling_test.dart index 86eebbfa9f..682f2ec2cd 100644 --- a/examples/cookbook/testing/integration/profiling/integration_test/scrolling_test.dart +++ b/examples/cookbook/testing/integration/profiling/integration_test/scrolling_test.dart @@ -28,5 +28,4 @@ void main() { // #enddocregion traceAction }); } - // #enddocregion ScrollWidgetTest diff --git a/examples/cookbook/testing/integration/profiling/test_driver/perf_driver.dart b/examples/cookbook/testing/integration/profiling/test_driver/perf_driver.dart index ce16660c23..133f384285 100644 --- a/examples/cookbook/testing/integration/profiling/test_driver/perf_driver.dart +++ b/examples/cookbook/testing/integration/profiling/test_driver/perf_driver.dart @@ -28,5 +28,4 @@ Future main() { }, ); } - // #enddocregion Timeline diff --git a/examples/cookbook/testing/unit/mocking/test/fetch_album_test.dart b/examples/cookbook/testing/unit/mocking/test/fetch_album_test.dart index dd8a50fa04..613b6bbf3d 100644 --- a/examples/cookbook/testing/unit/mocking/test/fetch_album_test.dart +++ b/examples/cookbook/testing/unit/mocking/test/fetch_album_test.dart @@ -7,6 +7,7 @@ import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'fetch_album_test.mocks.dart'; + // #docregion mockClient // Generate a MockClient using the Mockito package. @@ -46,5 +47,4 @@ void main() { }); // #docregion mockClient } - // #enddocregion mockClient diff --git a/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart b/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart index 6444bece03..7b5b285f49 100644 --- a/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart +++ b/examples/cookbook/testing/widget/introduction/test/main_step5_test.dart @@ -1,6 +1,7 @@ +// ignore_for_file: unused_local_variable + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -// ignore_for_file: unused_local_variable // #docregion main void main() { diff --git a/examples/cookbook/testing/widget/introduction/test/main_test.dart b/examples/cookbook/testing/widget/introduction/test/main_test.dart index 0df3233196..d5fd06ede9 100644 --- a/examples/cookbook/testing/widget/introduction/test/main_test.dart +++ b/examples/cookbook/testing/widget/introduction/test/main_test.dart @@ -38,5 +38,4 @@ class MyWidget extends StatelessWidget { ); } } - // #enddocregion widget diff --git a/examples/cookbook/testing/widget/orientation_tests/test/widget_test.dart b/examples/cookbook/testing/widget/orientation_tests/test/widget_test.dart index 3023664175..130241a970 100644 --- a/examples/cookbook/testing/widget/orientation_tests/test/widget_test.dart +++ b/examples/cookbook/testing/widget/orientation_tests/test/widget_test.dart @@ -66,5 +66,4 @@ void main() { // #docregion scaffolding }); } - // #enddocregion scaffolding diff --git a/examples/cookbook/testing/widget/scrolling/test/widget_test.dart b/examples/cookbook/testing/widget/scrolling/test/widget_test.dart index dd81b135b2..43e113a76c 100644 --- a/examples/cookbook/testing/widget/scrolling/test/widget_test.dart +++ b/examples/cookbook/testing/widget/scrolling/test/widget_test.dart @@ -29,5 +29,4 @@ void main() { expect(itemFinder, findsOneWidget); }); } - // #enddocregion ScrollWidgetTest diff --git a/examples/cookbook/testing/widget/tap_drag/test/main_test.dart b/examples/cookbook/testing/widget/tap_drag/test/main_test.dart index 983eb935da..4f36ddf9af 100644 --- a/examples/cookbook/testing/widget/tap_drag/test/main_test.dart +++ b/examples/cookbook/testing/widget/tap_drag/test/main_test.dart @@ -81,5 +81,4 @@ class _TodoListState extends State { ); } } - // #enddocregion TodoList diff --git a/examples/fwe/birdle/lib/main.dart b/examples/fwe/birdle/lib/main.dart index 062a1c6a71..196d9f680d 100644 --- a/examples/fwe/birdle/lib/main.dart +++ b/examples/fwe/birdle/lib/main.dart @@ -155,5 +155,4 @@ class Tile extends StatelessWidget { // #enddocregion AnimatedContainer } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step1_main.dart b/examples/fwe/birdle/lib/step1_main.dart index 067c1e6443..76735db15e 100644 --- a/examples/fwe/birdle/lib/step1_main.dart +++ b/examples/fwe/birdle/lib/step1_main.dart @@ -23,5 +23,4 @@ class MainApp extends StatelessWidget { ); } } - // #enddocregion MainApp diff --git a/examples/fwe/birdle/lib/step2_main.dart b/examples/fwe/birdle/lib/step2_main.dart index e8f5b64cf0..a5a0c7811d 100644 --- a/examples/fwe/birdle/lib/step2_main.dart +++ b/examples/fwe/birdle/lib/step2_main.dart @@ -65,8 +65,8 @@ class Tile extends StatelessWidget { // #enddocregion Tile-Container } } - // #enddocregion Tile + void docRegionTileUsage() { // #docregion TileUsage // main.dart line ~16 diff --git a/examples/fwe/birdle/lib/step2a_main.dart b/examples/fwe/birdle/lib/step2a_main.dart index a880634f6d..a15fe7d8c2 100644 --- a/examples/fwe/birdle/lib/step2a_main.dart +++ b/examples/fwe/birdle/lib/step2a_main.dart @@ -14,5 +14,4 @@ class Tile extends StatelessWidget { return Container(); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step2b_main.dart b/examples/fwe/birdle/lib/step2b_main.dart index 3cf854b6bf..51d4a67c3f 100644 --- a/examples/fwe/birdle/lib/step2b_main.dart +++ b/examples/fwe/birdle/lib/step2b_main.dart @@ -15,5 +15,4 @@ class Tile extends StatelessWidget { return Container(); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step2c_main.dart b/examples/fwe/birdle/lib/step2c_main.dart index 7542f1edd1..326b94f762 100644 --- a/examples/fwe/birdle/lib/step2c_main.dart +++ b/examples/fwe/birdle/lib/step2c_main.dart @@ -21,5 +21,4 @@ class Tile extends StatelessWidget { ); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step2d_main.dart b/examples/fwe/birdle/lib/step2d_main.dart index 348ea08742..8fb3dcb2b1 100644 --- a/examples/fwe/birdle/lib/step2d_main.dart +++ b/examples/fwe/birdle/lib/step2d_main.dart @@ -22,5 +22,4 @@ class Tile extends StatelessWidget { ); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step2e_main.dart b/examples/fwe/birdle/lib/step2e_main.dart index 1651ee0607..1a8b7e8f10 100644 --- a/examples/fwe/birdle/lib/step2e_main.dart +++ b/examples/fwe/birdle/lib/step2e_main.dart @@ -27,5 +27,4 @@ class Tile extends StatelessWidget { ); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step2f_main.dart b/examples/fwe/birdle/lib/step2f_main.dart index 53e4108f93..05e6086795 100644 --- a/examples/fwe/birdle/lib/step2f_main.dart +++ b/examples/fwe/birdle/lib/step2f_main.dart @@ -32,5 +32,4 @@ class Tile extends StatelessWidget { ); } } - // #enddocregion Tile diff --git a/examples/fwe/birdle/lib/step3_main.dart b/examples/fwe/birdle/lib/step3_main.dart index f07905ea88..b998e91dfb 100644 --- a/examples/fwe/birdle/lib/step3_main.dart +++ b/examples/fwe/birdle/lib/step3_main.dart @@ -67,5 +67,4 @@ class GamePage extends StatelessWidget { ); } } - // #enddocregion GamePage diff --git a/examples/fwe/birdle/lib/step3a_main.dart b/examples/fwe/birdle/lib/step3a_main.dart index 0c53e8db66..0e09ddecfc 100644 --- a/examples/fwe/birdle/lib/step3a_main.dart +++ b/examples/fwe/birdle/lib/step3a_main.dart @@ -17,5 +17,4 @@ class GamePage extends StatelessWidget { return Container(); } } - // #enddocregion GamePage diff --git a/examples/fwe/birdle/lib/step3b_main.dart b/examples/fwe/birdle/lib/step3b_main.dart index e3b9fb17e0..6bd37863df 100644 --- a/examples/fwe/birdle/lib/step3b_main.dart +++ b/examples/fwe/birdle/lib/step3b_main.dart @@ -23,5 +23,4 @@ class GamePage extends StatelessWidget { ); } } - // #enddocregion GamePage diff --git a/examples/fwe/birdle/lib/step3c_main.dart b/examples/fwe/birdle/lib/step3c_main.dart index 9d18cc5b10..415346d5fa 100644 --- a/examples/fwe/birdle/lib/step3c_main.dart +++ b/examples/fwe/birdle/lib/step3c_main.dart @@ -29,5 +29,4 @@ class GamePage extends StatelessWidget { ); } } - // #enddocregion GamePage diff --git a/examples/fwe/birdle/lib/step4_main.dart b/examples/fwe/birdle/lib/step4_main.dart index 1940ab78c1..23b304fe15 100644 --- a/examples/fwe/birdle/lib/step4_main.dart +++ b/examples/fwe/birdle/lib/step4_main.dart @@ -91,5 +91,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4a_main.dart b/examples/fwe/birdle/lib/step4a_main.dart index c754561ab1..b4662b93c1 100644 --- a/examples/fwe/birdle/lib/step4a_main.dart +++ b/examples/fwe/birdle/lib/step4a_main.dart @@ -14,5 +14,4 @@ class GuessInput extends StatelessWidget { return Container(); // Placeholder } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4b_main.dart b/examples/fwe/birdle/lib/step4b_main.dart index 3771531e78..63604b053c 100644 --- a/examples/fwe/birdle/lib/step4b_main.dart +++ b/examples/fwe/birdle/lib/step4b_main.dart @@ -29,5 +29,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4c_main.dart b/examples/fwe/birdle/lib/step4c_main.dart index fcf5967e17..320d3e1bce 100644 --- a/examples/fwe/birdle/lib/step4c_main.dart +++ b/examples/fwe/birdle/lib/step4c_main.dart @@ -33,5 +33,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4d_main.dart b/examples/fwe/birdle/lib/step4d_main.dart index 02a0cd4792..10439ce836 100644 --- a/examples/fwe/birdle/lib/step4d_main.dart +++ b/examples/fwe/birdle/lib/step4d_main.dart @@ -30,5 +30,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4e_main.dart b/examples/fwe/birdle/lib/step4e_main.dart index 53f89dcfb1..bfec4ac237 100644 --- a/examples/fwe/birdle/lib/step4e_main.dart +++ b/examples/fwe/birdle/lib/step4e_main.dart @@ -34,5 +34,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4f_main.dart b/examples/fwe/birdle/lib/step4f_main.dart index 3668ec06ee..68507f4acf 100644 --- a/examples/fwe/birdle/lib/step4f_main.dart +++ b/examples/fwe/birdle/lib/step4f_main.dart @@ -35,5 +35,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4g_main.dart b/examples/fwe/birdle/lib/step4g_main.dart index 0cdcd5e304..13dadf08be 100644 --- a/examples/fwe/birdle/lib/step4g_main.dart +++ b/examples/fwe/birdle/lib/step4g_main.dart @@ -35,5 +35,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4h_main.dart b/examples/fwe/birdle/lib/step4h_main.dart index 53908106cb..0d58e3713a 100644 --- a/examples/fwe/birdle/lib/step4h_main.dart +++ b/examples/fwe/birdle/lib/step4h_main.dart @@ -18,5 +18,4 @@ class GuessInput extends StatelessWidget { return Container(); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4i_main.dart b/examples/fwe/birdle/lib/step4i_main.dart index e55ad66db0..d2ee5050bc 100644 --- a/examples/fwe/birdle/lib/step4i_main.dart +++ b/examples/fwe/birdle/lib/step4i_main.dart @@ -39,5 +39,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4j_main.dart b/examples/fwe/birdle/lib/step4j_main.dart index 0786503955..377f8c703a 100644 --- a/examples/fwe/birdle/lib/step4j_main.dart +++ b/examples/fwe/birdle/lib/step4j_main.dart @@ -39,5 +39,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4k_main.dart b/examples/fwe/birdle/lib/step4k_main.dart index 0d72f28fa1..5c2b52df23 100644 --- a/examples/fwe/birdle/lib/step4k_main.dart +++ b/examples/fwe/birdle/lib/step4k_main.dart @@ -36,8 +36,8 @@ class GamePage extends StatelessWidget { ); } } - // #enddocregion GamePage + class GuessInput extends StatelessWidget { GuessInput({super.key, required this.onSubmitGuess}); final void Function(String) onSubmitGuess; diff --git a/examples/fwe/birdle/lib/step4l_main.dart b/examples/fwe/birdle/lib/step4l_main.dart index e26edcef98..4d20153574 100644 --- a/examples/fwe/birdle/lib/step4l_main.dart +++ b/examples/fwe/birdle/lib/step4l_main.dart @@ -25,5 +25,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step4m_main.dart b/examples/fwe/birdle/lib/step4m_main.dart index c1fc3013b2..5b478b5ed4 100644 --- a/examples/fwe/birdle/lib/step4m_main.dart +++ b/examples/fwe/birdle/lib/step4m_main.dart @@ -27,5 +27,4 @@ class GuessInput extends StatelessWidget { ); } } - // #enddocregion GuessInput diff --git a/examples/fwe/birdle/lib/step5_main.dart b/examples/fwe/birdle/lib/step5_main.dart index 38ee4f8067..940f4167a6 100644 --- a/examples/fwe/birdle/lib/step5_main.dart +++ b/examples/fwe/birdle/lib/step5_main.dart @@ -54,5 +54,4 @@ class _GamePageState extends State { ); } } - // #enddocregion GamePage diff --git a/examples/fwe/rolodex/lib/step1_advanced_ui/data/contact_group.dart b/examples/fwe/rolodex/lib/step1_advanced_ui/data/contact_group.dart index 9c4c841de3..2d5a6a2133 100644 --- a/examples/fwe/rolodex/lib/step1_advanced_ui/data/contact_group.dart +++ b/examples/fwe/rolodex/lib/step1_advanced_ui/data/contact_group.dart @@ -125,5 +125,4 @@ class ContactGroupsModel { _listsNotifier.dispose(); } } - // #enddocregion model_class diff --git a/examples/fwe/rolodex/lib/step2_adaptive_layout/screens/adaptive_layout.dart b/examples/fwe/rolodex/lib/step2_adaptive_layout/screens/adaptive_layout.dart index 6cd233a5e3..60a7736786 100644 --- a/examples/fwe/rolodex/lib/step2_adaptive_layout/screens/adaptive_layout.dart +++ b/examples/fwe/rolodex/lib/step2_adaptive_layout/screens/adaptive_layout.dart @@ -52,6 +52,5 @@ class _AdaptiveLayoutState extends State { ), ); } - // #enddocregion panel-and-divider } diff --git a/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups.dart b/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups.dart index 6b58173234..a6be2dbd5d 100644 --- a/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups.dart +++ b/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups.dart @@ -87,6 +87,5 @@ class _ContactGroupsView extends StatelessWidget { ], ); } - // #enddocregion build_trailing } diff --git a/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups_v1.dart b/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups_v1.dart index 414574672d..a486d734a3 100644 --- a/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups_v1.dart +++ b/examples/fwe/rolodex/lib/step3_slivers/screens/contact_groups_v1.dart @@ -56,5 +56,4 @@ class _ContactGroupsView extends StatelessWidget { ); } } - // #enddocregion contact_groups_view diff --git a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts.dart b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts.dart index a695a54408..1182a5289b 100644 --- a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts.dart +++ b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts.dart @@ -116,5 +116,4 @@ class ContactListSection extends StatelessWidget { ); } } - // #enddocregion contact_list_section diff --git a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v1.dart b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v1.dart index af54d2995c..7dd4f6d9b2 100644 --- a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v1.dart +++ b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v1.dart @@ -56,5 +56,4 @@ class _ContactListView extends StatelessWidget { ); } } - // #enddocregion contact_list_view diff --git a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v2.dart b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v2.dart index 84055864d4..5e678cc25e 100644 --- a/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v2.dart +++ b/examples/fwe/rolodex/lib/step3_slivers/screens/contacts_v2.dart @@ -60,5 +60,4 @@ class _ContactListView extends StatelessWidget { ); } } - // #enddocregion search diff --git a/examples/fwe/rolodex/lib/step4_navigation/screens/adaptive_layout.dart b/examples/fwe/rolodex/lib/step4_navigation/screens/adaptive_layout.dart index e58ec030ec..489c2194b3 100644 --- a/examples/fwe/rolodex/lib/step4_navigation/screens/adaptive_layout.dart +++ b/examples/fwe/rolodex/lib/step4_navigation/screens/adaptive_layout.dart @@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart'; import 'contact_groups.dart'; import 'contacts.dart'; + // #enddocregion imports const largeScreenMinWidth = 600; @@ -61,9 +62,7 @@ class _AdaptiveLayoutState extends State { ), ); } - // #enddocregion build_large_screen // #docregion reverted-state } - // #enddocregion reverted-state diff --git a/examples/fwe/wikipedia_reader/lib/step1_main.dart b/examples/fwe/wikipedia_reader/lib/step1_main.dart index affee140a0..54b521dc84 100644 --- a/examples/fwe/wikipedia_reader/lib/step1_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step1_main.dart @@ -29,6 +29,4 @@ class MainApp extends StatelessWidget { ); } } -// #enddocregion MainApp - -// #enddocregion All +// #enddocregion All, MainApp diff --git a/examples/fwe/wikipedia_reader/lib/step2_main.dart b/examples/fwe/wikipedia_reader/lib/step2_main.dart index 3dc1fd3d00..df07302d28 100644 --- a/examples/fwe/wikipedia_reader/lib/step2_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step2_main.dart @@ -40,5 +40,4 @@ class ArticleModel { return Summary.fromJson(jsonDecode(response.body) as Map); } } - // #enddocregion ArticleModel diff --git a/examples/fwe/wikipedia_reader/lib/step2a_main.dart b/examples/fwe/wikipedia_reader/lib/step2a_main.dart index ca172369fd..dca3daa0f7 100644 --- a/examples/fwe/wikipedia_reader/lib/step2a_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step2a_main.dart @@ -30,5 +30,4 @@ class MainApp extends StatelessWidget { class ArticleModel { // Properties and methods will be added here. } - // #enddocregion ArticleModel diff --git a/examples/fwe/wikipedia_reader/lib/step2b_main.dart b/examples/fwe/wikipedia_reader/lib/step2b_main.dart index bd22fb7d96..09e50ea131 100644 --- a/examples/fwe/wikipedia_reader/lib/step2b_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step2b_main.dart @@ -39,5 +39,4 @@ class ArticleModel { throw UnimplementedError(); } } - // #enddocregion ArticleModel diff --git a/examples/fwe/wikipedia_reader/lib/step2c_main.dart b/examples/fwe/wikipedia_reader/lib/step2c_main.dart index 00e253b4bd..2c6c00d5d0 100644 --- a/examples/fwe/wikipedia_reader/lib/step2c_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step2c_main.dart @@ -43,5 +43,4 @@ class ArticleModel { throw UnimplementedError(); } } - // #enddocregion ArticleModel diff --git a/examples/fwe/wikipedia_reader/lib/step3a_main.dart b/examples/fwe/wikipedia_reader/lib/step3a_main.dart index b6ca4d8209..816f612d0f 100644 --- a/examples/fwe/wikipedia_reader/lib/step3a_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step3a_main.dart @@ -38,5 +38,4 @@ class ArticleViewModel extends ChangeNotifier { ArticleViewModel(this.model); } - // #enddocregion ArticleViewModel diff --git a/examples/fwe/wikipedia_reader/lib/step3b_main.dart b/examples/fwe/wikipedia_reader/lib/step3b_main.dart index 31a89acf26..f115d5367b 100644 --- a/examples/fwe/wikipedia_reader/lib/step3b_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step3b_main.dart @@ -28,5 +28,4 @@ class ArticleViewModel extends ChangeNotifier { // Methods will be added next. Future fetchArticle() async {} } - // #enddocregion ArticleViewModel diff --git a/examples/fwe/wikipedia_reader/lib/step3c_main.dart b/examples/fwe/wikipedia_reader/lib/step3c_main.dart index 297128f445..c97488f132 100644 --- a/examples/fwe/wikipedia_reader/lib/step3c_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step3c_main.dart @@ -31,5 +31,4 @@ class ArticleViewModel extends ChangeNotifier { notifyListeners(); } } - // #enddocregion ArticleViewModel diff --git a/examples/fwe/wikipedia_reader/lib/step3d_main.dart b/examples/fwe/wikipedia_reader/lib/step3d_main.dart index 06ac5d980c..eb5b242ae9 100644 --- a/examples/fwe/wikipedia_reader/lib/step3d_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step3d_main.dart @@ -37,5 +37,4 @@ class ArticleViewModel extends ChangeNotifier { notifyListeners(); } } - // #enddocregion ArticleViewModel diff --git a/examples/fwe/wikipedia_reader/lib/step3e_main.dart b/examples/fwe/wikipedia_reader/lib/step3e_main.dart index e2f21faa33..13f674f7db 100644 --- a/examples/fwe/wikipedia_reader/lib/step3e_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step3e_main.dart @@ -36,6 +36,5 @@ class ArticleViewModel extends ChangeNotifier { isLoading = false; notifyListeners(); } - // #enddocregion fetchArticle } diff --git a/examples/fwe/wikipedia_reader/lib/step4_main.dart b/examples/fwe/wikipedia_reader/lib/step4_main.dart index 1bcc80de28..7c14914163 100644 --- a/examples/fwe/wikipedia_reader/lib/step4_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4_main.dart @@ -166,5 +166,4 @@ class ArticleWidget extends StatelessWidget { ); } } - // #enddocregion article diff --git a/examples/fwe/wikipedia_reader/lib/step4b_main.dart b/examples/fwe/wikipedia_reader/lib/step4b_main.dart index 14e5f9220c..d496502102 100644 --- a/examples/fwe/wikipedia_reader/lib/step4b_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4b_main.dart @@ -37,5 +37,4 @@ class _ArticleViewState extends State { ); } } - // #enddocregion view-model diff --git a/examples/fwe/wikipedia_reader/lib/step4c_main.dart b/examples/fwe/wikipedia_reader/lib/step4c_main.dart index 7b18ec15fd..90e74551ef 100644 --- a/examples/fwe/wikipedia_reader/lib/step4c_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4c_main.dart @@ -42,5 +42,4 @@ class _ArticleViewState extends State { ); } } - // #enddocregion view-model diff --git a/examples/fwe/wikipedia_reader/lib/step4d_main.dart b/examples/fwe/wikipedia_reader/lib/step4d_main.dart index 70d2916ef7..7ba778a6c8 100644 --- a/examples/fwe/wikipedia_reader/lib/step4d_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4d_main.dart @@ -20,5 +20,4 @@ class ArticlePage extends StatelessWidget { ); } } - // #enddocregion page diff --git a/examples/fwe/wikipedia_reader/lib/step4e_main.dart b/examples/fwe/wikipedia_reader/lib/step4e_main.dart index 51660c62dd..f683ccb9a9 100644 --- a/examples/fwe/wikipedia_reader/lib/step4e_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4e_main.dart @@ -22,5 +22,4 @@ class ArticlePage extends StatelessWidget { ); } } - // #enddocregion page diff --git a/examples/fwe/wikipedia_reader/lib/step4f_main.dart b/examples/fwe/wikipedia_reader/lib/step4f_main.dart index cf1ffbfe64..7a232041b9 100644 --- a/examples/fwe/wikipedia_reader/lib/step4f_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4f_main.dart @@ -13,5 +13,4 @@ class ArticleWidget extends StatelessWidget { return const Text('Article content will be displayed here...'); } } - // #enddocregion article diff --git a/examples/fwe/wikipedia_reader/lib/step4g_main.dart b/examples/fwe/wikipedia_reader/lib/step4g_main.dart index 193fc99c6d..f06365ba42 100644 --- a/examples/fwe/wikipedia_reader/lib/step4g_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4g_main.dart @@ -21,5 +21,4 @@ class ArticleWidget extends StatelessWidget { ); } } - // #enddocregion article diff --git a/examples/fwe/wikipedia_reader/lib/step4h_main.dart b/examples/fwe/wikipedia_reader/lib/step4h_main.dart index 259b8151b1..bf08ace8b6 100644 --- a/examples/fwe/wikipedia_reader/lib/step4h_main.dart +++ b/examples/fwe/wikipedia_reader/lib/step4h_main.dart @@ -22,5 +22,4 @@ class ArticleWidget extends StatelessWidget { ); } } - // #enddocregion article diff --git a/examples/fwe/wikipedia_reader/lib/summary.dart b/examples/fwe/wikipedia_reader/lib/summary.dart index 6f67fe84bc..0c619a998f 100644 --- a/examples/fwe/wikipedia_reader/lib/summary.dart +++ b/examples/fwe/wikipedia_reader/lib/summary.dart @@ -245,5 +245,4 @@ String? getFileExtension(String file) { } const acceptableImageFormats = ['png', 'jpg', 'jpeg']; - // #enddocregion All diff --git a/examples/get-started/flutter-for/android_devs/lib/async.dart b/examples/get-started/flutter-for/android_devs/lib/async.dart index 273994a0c0..54b682f8d0 100644 --- a/examples/get-started/flutter-for/android_devs/lib/async.dart +++ b/examples/get-started/flutter-for/android_devs/lib/async.dart @@ -66,6 +66,5 @@ class _SampleAppPageState extends State { .cast>(); }); } - // #enddocregion load-data } diff --git a/examples/get-started/flutter-for/android_devs/lib/custom.dart b/examples/get-started/flutter-for/android_devs/lib/custom.dart index 8faea4918c..87c0957d3f 100644 --- a/examples/get-started/flutter-for/android_devs/lib/custom.dart +++ b/examples/get-started/flutter-for/android_devs/lib/custom.dart @@ -21,6 +21,5 @@ class MyWidget extends StatelessWidget { Widget build(BuildContext context) { return const Center(child: CustomButton('Hello')); } - // #enddocregion use-custom-button } diff --git a/examples/get-started/flutter-for/android_devs/lib/events.dart b/examples/get-started/flutter-for/android_devs/lib/events.dart index 9351b3bbb1..0de7bedf8f 100644 --- a/examples/get-started/flutter-for/android_devs/lib/events.dart +++ b/examples/get-started/flutter-for/android_devs/lib/events.dart @@ -15,7 +15,6 @@ class MyButton extends StatelessWidget { child: const Text('Button'), ); } - // #enddocregion on-pressed } @@ -89,5 +88,4 @@ class _SampleAppState extends State ); } } - // #enddocregion sample-app diff --git a/examples/get-started/flutter-for/android_devs/lib/images.dart b/examples/get-started/flutter-for/android_devs/lib/images.dart index b23afecda1..f05046c189 100644 --- a/examples/get-started/flutter-for/android_devs/lib/images.dart +++ b/examples/get-started/flutter-for/android_devs/lib/images.dart @@ -22,6 +22,5 @@ class ImageExample extends StatelessWidget { Widget build(BuildContext context) { return Image.asset('images/my_image.png'); } - // #enddocregion image-asset } diff --git a/examples/get-started/flutter-for/android_devs/lib/isolates.dart b/examples/get-started/flutter-for/android_devs/lib/isolates.dart index be7bba6c43..ecf2333627 100644 --- a/examples/get-started/flutter-for/android_devs/lib/isolates.dart +++ b/examples/get-started/flutter-for/android_devs/lib/isolates.dart @@ -121,6 +121,5 @@ class _SampleAppPageState extends State { port.send([msg, response.sendPort]); return response.first; } - // #enddocregion load-data } diff --git a/examples/get-started/flutter-for/android_devs/lib/layout.dart b/examples/get-started/flutter-for/android_devs/lib/layout.dart index 1420791279..7b8ff443b2 100644 --- a/examples/get-started/flutter-for/android_devs/lib/layout.dart +++ b/examples/get-started/flutter-for/android_devs/lib/layout.dart @@ -79,7 +79,6 @@ class MyWidget extends StatelessWidget { ), ); } - // #enddocregion simple-widget } @@ -99,7 +98,6 @@ class RowExample extends StatelessWidget { ], ); } - // #enddocregion row } @@ -119,7 +117,6 @@ class ColumnExample extends StatelessWidget { ], ); } - // #enddocregion column } @@ -138,6 +135,5 @@ class ListViewExample extends StatelessWidget { ], ); } - // #enddocregion list-view } diff --git a/examples/get-started/flutter-for/android_devs/lib/text.dart b/examples/get-started/flutter-for/android_devs/lib/text.dart index 4bc455ee4f..db03734503 100644 --- a/examples/get-started/flutter-for/android_devs/lib/text.dart +++ b/examples/get-started/flutter-for/android_devs/lib/text.dart @@ -16,6 +16,5 @@ class MyWidget extends StatelessWidget { ), ); } - // #enddocregion custom-font } diff --git a/examples/get-started/flutter-for/ios_devs/lib/canvas.dart b/examples/get-started/flutter-for/ios_devs/lib/canvas.dart index abbbbb9ade..eb4c19b3e4 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/canvas.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/canvas.dart @@ -64,5 +64,4 @@ class SignaturePainter extends CustomPainter { bool shouldRepaint(SignaturePainter oldDelegate) => oldDelegate.points != points; } - // #enddocregion custom-painter diff --git a/examples/get-started/flutter-for/ios_devs/lib/custom.dart b/examples/get-started/flutter-for/ios_devs/lib/custom.dart index 920cb25c9f..a570dc9435 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/custom.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/custom.dart @@ -21,6 +21,5 @@ class MyWidget extends StatelessWidget { Widget build(BuildContext context) { return const Center(child: CustomButton('Hello')); } - // #enddocregion use-custom-button } diff --git a/examples/get-started/flutter-for/ios_devs/lib/events.dart b/examples/get-started/flutter-for/ios_devs/lib/events.dart index b5fe72a6c4..72c85122d5 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/events.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/events.dart @@ -14,7 +14,6 @@ class MyButton extends StatelessWidget { child: const Text('Button'), ); } - // #enddocregion on-pressed } @@ -82,5 +81,4 @@ class _SampleAppState extends State ); } } - // #enddocregion sample-app diff --git a/examples/get-started/flutter-for/ios_devs/lib/form.dart b/examples/get-started/flutter-for/ios_devs/lib/form.dart index a6b6dcc0e1..dfae2a464c 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/form.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/form.dart @@ -62,5 +62,4 @@ class _MyFormState extends State { ); } } - // #enddocregion my-form-state diff --git a/examples/get-started/flutter-for/ios_devs/lib/get_started.dart b/examples/get-started/flutter-for/ios_devs/lib/get_started.dart index 4eeb37a140..ef75a346b7 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/get_started.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/get_started.dart @@ -29,5 +29,4 @@ class HomePage extends StatelessWidget { return const Scaffold(body: Center(child: Text('Hello, World!'))); } } - // #enddocregion homepage diff --git a/examples/get-started/flutter-for/ios_devs/lib/grid.dart b/examples/get-started/flutter-for/ios_devs/lib/grid.dart index 3c2889ae84..b13c754aff 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/grid.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/grid.dart @@ -41,5 +41,4 @@ class HomePage extends StatelessWidget { ); } } - // #enddocregion grid-example diff --git a/examples/get-started/flutter-for/ios_devs/lib/images.dart b/examples/get-started/flutter-for/ios_devs/lib/images.dart index a434bb469a..a7cdb365ff 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/images.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/images.dart @@ -21,6 +21,5 @@ class ImageExample extends StatelessWidget { Widget build(BuildContext context) { return Image.asset('images/my_image.png'); } - // #enddocregion image-asset } diff --git a/examples/get-started/flutter-for/ios_devs/lib/layout.dart b/examples/get-started/flutter-for/ios_devs/lib/layout.dart index 1a64106027..ffe24d06f3 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/layout.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/layout.dart @@ -73,7 +73,6 @@ class MyWidget extends StatelessWidget { ), ); } - // #enddocregion simple-widget } @@ -93,7 +92,6 @@ class RowExample extends StatelessWidget { ], ); } - // #enddocregion row } @@ -113,7 +111,6 @@ class ColumnExample extends StatelessWidget { ], ); } - // #enddocregion column } @@ -132,6 +129,5 @@ class ListViewExample extends StatelessWidget { ], ); } - // #enddocregion list-view } diff --git a/examples/get-started/flutter-for/ios_devs/lib/list.dart b/examples/get-started/flutter-for/ios_devs/lib/list.dart index 231bfa9c7e..bea4e54ab9 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/list.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/list.dart @@ -41,5 +41,4 @@ class HomePage extends StatelessWidget { ); } } - // #enddocregion simple-list diff --git a/examples/get-started/flutter-for/ios_devs/lib/navigation.dart b/examples/get-started/flutter-for/ios_devs/lib/navigation.dart index c791bc83fa..bc0e8123a2 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/navigation.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/navigation.dart @@ -96,5 +96,4 @@ class DetailsPage extends StatelessWidget { ); } } - // #enddocregion details-page diff --git a/examples/get-started/flutter-for/ios_devs/lib/state.dart b/examples/get-started/flutter-for/ios_devs/lib/state.dart index f8be57e94e..57d5f00674 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/state.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/state.dart @@ -42,5 +42,4 @@ class _MyHomePageState extends State { ); } } - // #enddocregion state diff --git a/examples/get-started/flutter-for/ios_devs/lib/text.dart b/examples/get-started/flutter-for/ios_devs/lib/text.dart index 4bc455ee4f..db03734503 100644 --- a/examples/get-started/flutter-for/ios_devs/lib/text.dart +++ b/examples/get-started/flutter-for/ios_devs/lib/text.dart @@ -16,6 +16,5 @@ class MyWidget extends StatelessWidget { ), ); } - // #enddocregion custom-font } diff --git a/examples/get-started/flutter-for/react_native_devs/lib/best_practices.dart b/examples/get-started/flutter-for/react_native_devs/lib/best_practices.dart index b4cbee356f..0ad022035b 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/best_practices.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/best_practices.dart @@ -30,5 +30,4 @@ class MyStatelessWidget extends StatelessWidget { ); } } - // #enddocregion use-stateful-widget diff --git a/examples/get-started/flutter-for/react_native_devs/lib/components.dart b/examples/get-started/flutter-for/react_native_devs/lib/components.dart index 12e5dbe61d..75ac157164 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/components.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/components.dart @@ -38,5 +38,4 @@ class UseCard extends StatelessWidget { ); } } - // #enddocregion components diff --git a/examples/get-started/flutter-for/react_native_devs/lib/examples.dart b/examples/get-started/flutter-for/react_native_devs/lib/examples.dart index 159f4f3321..0169d333fe 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/examples.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/examples.dart @@ -10,6 +10,7 @@ import 'package:flutter/material.dart'; // #enddocregion package-import // #docregion shared-prefs import 'package:shared_preferences/shared_preferences.dart'; + // #enddocregion shared-prefs // #docregion main @@ -161,7 +162,6 @@ class ThemeExample extends StatelessWidget { home: const StylingPage(), ); } - // #enddocregion theme } @@ -199,7 +199,6 @@ class ThemeDataExample extends StatelessWidget { ), ); } - // #enddocregion theme-data } @@ -249,7 +248,6 @@ class DrawerExample extends StatelessWidget { ), ); } - // #enddocregion drawer } @@ -274,7 +272,6 @@ class ScaffoldExample extends StatelessWidget { body: Container(), ); } - // #enddocregion scaffold } @@ -310,7 +307,6 @@ class GestureDetectorExample extends StatelessWidget { }, ); } - // #enddocregion gesture-detector } @@ -383,7 +379,6 @@ class _TextEditingExampleState extends State { ], ); } - // #enddocregion text-editing-controller } @@ -444,7 +439,6 @@ class _FormExampleState extends State { ), ); } - // #enddocregion form-state } diff --git a/examples/get-started/flutter-for/react_native_devs/lib/main.dart b/examples/get-started/flutter-for/react_native_devs/lib/main.dart index 0cff1e114c..6bb6c9c6b4 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/main.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/main.dart @@ -51,5 +51,4 @@ void trueExample() { bool fn() { return true; } - // #enddocregion function diff --git a/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart b/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart index 4d6fda85ff..3cf84a9988 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/navigation.dart @@ -145,6 +145,5 @@ class DrawerExample extends StatelessWidget { ), ); } - // #enddocregion drawer } diff --git a/examples/get-started/flutter-for/react_native_devs/lib/stateful.dart b/examples/get-started/flutter-for/react_native_devs/lib/stateful.dart index f59a41e62c..6bd5d91188 100644 --- a/examples/get-started/flutter-for/react_native_devs/lib/stateful.dart +++ b/examples/get-started/flutter-for/react_native_devs/lib/stateful.dart @@ -60,5 +60,4 @@ class _MyStatefulWidgetState extends State { ); } } - // #enddocregion stateful-widget-state diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/custom_button.dart b/examples/get-started/flutter-for/xamarin_devs/lib/custom_button.dart index 6d883403e4..4e56a159b1 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/custom_button.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/custom_button.dart @@ -21,6 +21,5 @@ class UseCustomButton extends StatelessWidget { Widget build(BuildContext context) { return const Center(child: CustomButton('Hello')); } - // #enddocregion use-custom-button } diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/gestures.dart b/examples/get-started/flutter-for/xamarin_devs/lib/gestures.dart index 26202fce0f..26ab4e8f5f 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/gestures.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/gestures.dart @@ -14,7 +14,6 @@ class MyWidget extends StatelessWidget { child: const Text('Button'), ); } - // #enddocregion elevated-button } @@ -83,5 +82,4 @@ class _RotatingFlutterDetectorState extends State ); } } - // #enddocregion rotating-flutter-detector diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/images.dart b/examples/get-started/flutter-for/xamarin_devs/lib/images.dart index c82ab861ef..97506184bd 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/images.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/images.dart @@ -8,7 +8,6 @@ class ImageAssetExample extends StatelessWidget { Widget build(BuildContext context) { return Image.asset('images/my_icon.png'); } - // #enddocregion image-asset } @@ -20,6 +19,5 @@ class AssetImageExample extends StatelessWidget { Widget build(BuildContext context) { return const Image(image: AssetImage('images/my_image.png')); } - // #enddocregion asset-image } diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/layouts.dart b/examples/get-started/flutter-for/xamarin_devs/lib/layouts.dart index 045930dd3d..96a557e0e9 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/layouts.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/layouts.dart @@ -16,7 +16,6 @@ class RowExample extends StatelessWidget { ], ); } - // #enddocregion row } @@ -60,7 +59,6 @@ class GridExample extends StatelessWidget { }), ); } - // #enddocregion grid } @@ -80,7 +78,6 @@ class StackExample extends StatelessWidget { ], ); } - // #enddocregion stack } @@ -92,7 +89,6 @@ class ScrollViewExample extends StatelessWidget { Widget build(BuildContext context) { return const SingleChildScrollView(child: Text('Long Content')); } - // #enddocregion scroll-view } @@ -111,6 +107,5 @@ class ListViewExample extends StatelessWidget { ], ); } - // #enddocregion list-view } diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/main.dart b/examples/get-started/flutter-for/xamarin_devs/lib/main.dart index c0f0443ab4..5d5d49b5a8 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/main.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/main.dart @@ -18,5 +18,4 @@ class MyApp extends StatelessWidget { ); } } - // #enddocregion my-app diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/padding.dart b/examples/get-started/flutter-for/xamarin_devs/lib/padding.dart index 3c3cafa1c9..c42f75f732 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/padding.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/padding.dart @@ -19,6 +19,5 @@ class MyWidget extends StatelessWidget { ), ); } - // #enddocregion padding } diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/page.dart b/examples/get-started/flutter-for/xamarin_devs/lib/page.dart index 77d27a5bb9..cf9e97ea46 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/page.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/page.dart @@ -66,5 +66,4 @@ class _MyHomePageState extends State { ); } } - // #enddocregion my-home-page-state diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart b/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart index 3ce40eb36e..c41e95a99d 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/strings.dart @@ -56,6 +56,5 @@ class CustomFontExample extends StatelessWidget { ), ); } - // #enddocregion custom-font } diff --git a/examples/get-started/flutter-for/xamarin_devs/lib/views.dart b/examples/get-started/flutter-for/xamarin_devs/lib/views.dart index 4fc790d1c4..f44d834043 100644 --- a/examples/get-started/flutter-for/xamarin_devs/lib/views.dart +++ b/examples/get-started/flutter-for/xamarin_devs/lib/views.dart @@ -62,5 +62,4 @@ class _SampleAppPageState extends State { ); } } - // #enddocregion add-remove-element diff --git a/examples/googleapis/lib/main.dart b/examples/googleapis/lib/main.dart index 981dae7b39..324c92411f 100644 --- a/examples/googleapis/lib/main.dart +++ b/examples/googleapis/lib/main.dart @@ -17,8 +17,9 @@ import 'package:google_sign_in/google_sign_in.dart'; // #enddocregion google-import // #docregion youtube-import -/// Provides the `YouTubeApi` class. +// Provides the `YouTubeApi` class. import 'package:googleapis/youtube/v3.dart'; + // #enddocregion youtube-import const _title = 'My YouTube Favorites'; @@ -37,8 +38,8 @@ class _LikedVideosWidget extends StatefulWidget { class _LikedVideosWidgetState extends State<_LikedVideosWidget> { // #docregion post-init GoogleSignInAccount? _currentUser; - // #enddocregion post-init + List? _favoriteVideos; // #docregion init diff --git a/examples/internationalization/gen_l10n_example/lib/examples.dart b/examples/internationalization/gen_l10n_example/lib/examples.dart index 8bc32e8f4d..00c83aa532 100644 --- a/examples/internationalization/gen_l10n_example/lib/examples.dart +++ b/examples/internationalization/gen_l10n_example/lib/examples.dart @@ -100,6 +100,5 @@ class _PageWithDatePickerState extends State { ), ); } - // #enddocregion date-picker } diff --git a/examples/internationalization/gen_l10n_example/lib/main.dart b/examples/internationalization/gen_l10n_example/lib/main.dart index bd302d0868..a9a725c2ec 100644 --- a/examples/internationalization/gen_l10n_example/lib/main.dart +++ b/examples/internationalization/gen_l10n_example/lib/main.dart @@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart'; // #docregion app-localizations-import import 'l10n/app_localizations.dart'; + // #enddocregion app-localizations-import class MyApp extends StatelessWidget { diff --git a/examples/layout/base/lib/cupertino.dart b/examples/layout/base/lib/cupertino.dart index a4fb846445..061b30fae7 100644 --- a/examples/layout/base/lib/cupertino.dart +++ b/examples/layout/base/lib/cupertino.dart @@ -31,5 +31,4 @@ class MyApp extends StatelessWidget { ); } } - // #enddocregion my-app diff --git a/examples/layout/base/lib/main.dart b/examples/layout/base/lib/main.dart index 37d93c21c3..eb16a43918 100644 --- a/examples/layout/base/lib/main.dart +++ b/examples/layout/base/lib/main.dart @@ -29,5 +29,4 @@ class MyApp extends StatelessWidget { ); } } - // #enddocregion my-app, all diff --git a/examples/layout/card_and_stack/lib/main.dart b/examples/layout/card_and_stack/lib/main.dart index bd9b4de8a2..9dfd86959b 100644 --- a/examples/layout/card_and_stack/lib/main.dart +++ b/examples/layout/card_and_stack/lib/main.dart @@ -79,6 +79,5 @@ class MyApp extends StatelessWidget { ], ); } - // #enddocregion stack } diff --git a/examples/layout/grid_and_list/lib/main.dart b/examples/layout/grid_and_list/lib/main.dart index 8d58843d1d..9c6ceb89db 100644 --- a/examples/layout/grid_and_list/lib/main.dart +++ b/examples/layout/grid_and_list/lib/main.dart @@ -71,6 +71,5 @@ class MyApp extends StatelessWidget { leading: Icon(icon, color: Colors.blue[500]), ); } - // #enddocregion list } diff --git a/examples/layout/lakes/interactive/lib/main.dart b/examples/layout/lakes/interactive/lib/main.dart index eea26684f7..5216bfc960 100644 --- a/examples/layout/lakes/interactive/lib/main.dart +++ b/examples/layout/lakes/interactive/lib/main.dart @@ -209,5 +209,4 @@ class _FavoriteWidgetState extends State { // #docregion favorite-state-build } - // #enddocregion favorite-state, favorite-state-build diff --git a/examples/layout/lakes/step2/lib/main.dart b/examples/layout/lakes/step2/lib/main.dart index cc04da2da5..2bb30f1e40 100644 --- a/examples/layout/lakes/step2/lib/main.dart +++ b/examples/layout/lakes/step2/lib/main.dart @@ -67,5 +67,4 @@ class TitleSection extends StatelessWidget { ); } } - // #enddocregion title-section diff --git a/examples/layout/lakes/step3/lib/main.dart b/examples/layout/lakes/step3/lib/main.dart index cd3e6c3c54..ea3bda9213 100644 --- a/examples/layout/lakes/step3/lib/main.dart +++ b/examples/layout/lakes/step3/lib/main.dart @@ -132,5 +132,4 @@ class ButtonWithText extends StatelessWidget { ); } } - // #enddocregion button-with-text, button-section diff --git a/examples/layout/lakes/step4/lib/main.dart b/examples/layout/lakes/step4/lib/main.dart index eb4c4e9717..c4856b1a6a 100644 --- a/examples/layout/lakes/step4/lib/main.dart +++ b/examples/layout/lakes/step4/lib/main.dart @@ -150,5 +150,4 @@ class TextSection extends StatelessWidget { ); } } - // #enddocregion text-section diff --git a/examples/layout/lakes/step5/lib/main.dart b/examples/layout/lakes/step5/lib/main.dart index 5a7e5acd43..f7dd3da5d1 100644 --- a/examples/layout/lakes/step5/lib/main.dart +++ b/examples/layout/lakes/step5/lib/main.dart @@ -162,5 +162,4 @@ class ImageSection extends StatelessWidget { // #enddocregion image-asset } } - // #enddocregion image-section diff --git a/examples/layout/lakes/step6/lib/main.dart b/examples/layout/lakes/step6/lib/main.dart index f076bce7ef..52de3a1503 100644 --- a/examples/layout/lakes/step6/lib/main.dart +++ b/examples/layout/lakes/step6/lib/main.dart @@ -219,5 +219,4 @@ class _FavoriteWidgetState extends State { // #docregion favorite-state-fields } - // #enddocregion favorite-state, favorite-state-fields, favorite-state-build diff --git a/examples/layout/non_material/lib/main.dart b/examples/layout/non_material/lib/main.dart index fa457a4313..743f3b52a6 100644 --- a/examples/layout/non_material/lib/main.dart +++ b/examples/layout/non_material/lib/main.dart @@ -25,5 +25,4 @@ class MyApp extends StatelessWidget { ); } } - // #enddocregion my-app diff --git a/examples/platform_integration/pigeon/lib/pigeon_source.dart b/examples/platform_integration/pigeon/lib/pigeon_source.dart index 08b544063d..a5ea1de44e 100644 --- a/examples/platform_integration/pigeon/lib/pigeon_source.dart +++ b/examples/platform_integration/pigeon/lib/pigeon_source.dart @@ -22,5 +22,4 @@ abstract class Api { @async SearchReply search(SearchRequest request); } - // #enddocregion search diff --git a/examples/platform_integration/platform_channels/lib/platform_channels.dart b/examples/platform_integration/platform_channels/lib/platform_channels.dart index c86180c57a..e21e24d2b6 100644 --- a/examples/platform_integration/platform_channels/lib/platform_channels.dart +++ b/examples/platform_integration/platform_channels/lib/platform_channels.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + // #enddocregion import class MyHomePage extends StatefulWidget { @@ -52,6 +53,5 @@ class _MyHomePageState extends State { ), ); } - // #enddocregion build } diff --git a/examples/platform_integration/platform_views/lib/native_view_example_1.dart b/examples/platform_integration/platform_views/lib/native_view_example_1.dart index b2bfe0ab73..9976c6fa73 100644 --- a/examples/platform_integration/platform_views/lib/native_view_example_1.dart +++ b/examples/platform_integration/platform_views/lib/native_view_example_1.dart @@ -4,6 +4,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; + // #enddocregion import class HybridCompositionWidget extends StatelessWidget { @@ -42,6 +43,5 @@ class HybridCompositionWidget extends StatelessWidget { }, ); } - // #enddocregion hybrid-composition } diff --git a/examples/platform_integration/platform_views/lib/native_view_example_2.dart b/examples/platform_integration/platform_views/lib/native_view_example_2.dart index b9957cbe43..65a3b144a0 100644 --- a/examples/platform_integration/platform_views/lib/native_view_example_2.dart +++ b/examples/platform_integration/platform_views/lib/native_view_example_2.dart @@ -1,6 +1,7 @@ // #docregion import import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + // #enddocregion import class VirtualDisplayWidget extends StatelessWidget { @@ -21,6 +22,5 @@ class VirtualDisplayWidget extends StatelessWidget { creationParamsCodec: const StandardMessageCodec(), ); } - // #enddocregion virtual-display } diff --git a/examples/platform_integration/platform_views/lib/native_view_example_3.dart b/examples/platform_integration/platform_views/lib/native_view_example_3.dart index 8961de491b..bda07d786d 100644 --- a/examples/platform_integration/platform_views/lib/native_view_example_3.dart +++ b/examples/platform_integration/platform_views/lib/native_view_example_3.dart @@ -24,7 +24,6 @@ class IOSCompositionWidget extends StatelessWidget { creationParamsCodec: const StandardMessageCodec(), ); } - // #enddocregion ios-composition } @@ -50,6 +49,5 @@ class TogetherWidget extends StatelessWidget { throw UnsupportedError('Unsupported platform view'); } } - // #enddocregion together-widget } diff --git a/examples/platform_integration/platform_views/lib/native_view_example_4.dart b/examples/platform_integration/platform_views/lib/native_view_example_4.dart index 21717df537..2d05f2549e 100644 --- a/examples/platform_integration/platform_views/lib/native_view_example_4.dart +++ b/examples/platform_integration/platform_views/lib/native_view_example_4.dart @@ -24,7 +24,6 @@ class MacOSCompositionWidget extends StatelessWidget { creationParamsCodec: const StandardMessageCodec(), ); } - // #enddocregion macos-composition } @@ -50,6 +49,5 @@ class TogetherWidget extends StatelessWidget { throw UnsupportedError('Unsupported platform view'); } } - // #enddocregion together-widget } diff --git a/examples/platform_integration/plugin_api_migration/lib/english_words.dart b/examples/platform_integration/plugin_api_migration/lib/english_words.dart index abe6f4fc5d..1b95a38641 100644 --- a/examples/platform_integration/plugin_api_migration/lib/english_words.dart +++ b/examples/platform_integration/plugin_api_migration/lib/english_words.dart @@ -25,5 +25,4 @@ class DemoPage extends StatelessWidget { ); } } - // #enddocregion english-words diff --git a/examples/platform_integration/plugin_api_migration/lib/test.dart b/examples/platform_integration/plugin_api_migration/lib/test.dart index f196e2e350..44fd195b0c 100644 --- a/examples/platform_integration/plugin_api_migration/lib/test.dart +++ b/examples/platform_integration/plugin_api_migration/lib/test.dart @@ -12,5 +12,4 @@ void main() { expect(batteryLevel, isNotNull); }); } - // #enddocregion test diff --git a/examples/platform_integration/plugin_api_migration/lib/url_launcher.dart b/examples/platform_integration/plugin_api_migration/lib/url_launcher.dart index c16b19abb1..0fd57dfe80 100644 --- a/examples/platform_integration/plugin_api_migration/lib/url_launcher.dart +++ b/examples/platform_integration/plugin_api_migration/lib/url_launcher.dart @@ -34,5 +34,4 @@ class DemoPage extends StatelessWidget { ); } } - // #enddocregion url-launcher diff --git a/examples/resources/architectural_overview/lib/main.dart b/examples/resources/architectural_overview/lib/main.dart index 581d26e703..1a26a0a251 100644 --- a/examples/resources/architectural_overview/lib/main.dart +++ b/examples/resources/architectural_overview/lib/main.dart @@ -93,7 +93,6 @@ class LayoutBuilderExample extends StatelessWidget { }, ); } - // #enddocregion layout-builder } diff --git a/examples/resources/dart_swift_concurrency/lib/async_weather.dart b/examples/resources/dart_swift_concurrency/lib/async_weather.dart index c6fca8c35a..bd15794aa4 100644 --- a/examples/resources/dart_swift_concurrency/lib/async_weather.dart +++ b/examples/resources/dart_swift_concurrency/lib/async_weather.dart @@ -56,5 +56,4 @@ class HomePage extends StatelessWidget { ); } } - // #enddocregion home-page-widget diff --git a/examples/state_mgmt/simple/lib/src/passing_callbacks.dart b/examples/state_mgmt/simple/lib/src/passing_callbacks.dart index 1760e68873..1a2b099ff8 100644 --- a/examples/state_mgmt/simple/lib/src/passing_callbacks.dart +++ b/examples/state_mgmt/simple/lib/src/passing_callbacks.dart @@ -16,7 +16,6 @@ class CallbackPasser extends StatelessWidget { void myTapCallback(Item item) { print('user tapped on $item'); } - // #enddocregion methods } diff --git a/examples/state_mgmt/simple/lib/src/provider.dart b/examples/state_mgmt/simple/lib/src/provider.dart index 571e3361b8..de82c17363 100644 --- a/examples/state_mgmt/simple/lib/src/provider.dart +++ b/examples/state_mgmt/simple/lib/src/provider.dart @@ -75,7 +75,6 @@ class MyCartUsingWidget extends StatelessWidget { // #docregion build ); } - // #enddocregion build } @@ -118,7 +117,6 @@ class MyCatalogItem extends StatelessWidget { var cartModel = somehowGetMyCartModel(context); cartModel.add(item); } - // #enddocregion my-tap-handler } diff --git a/examples/state_mgmt/simple/lib/src/set_state.dart b/examples/state_mgmt/simple/lib/src/set_state.dart index d09c6a9d4e..893b1481fd 100644 --- a/examples/state_mgmt/simple/lib/src/set_state.dart +++ b/examples/state_mgmt/simple/lib/src/set_state.dart @@ -40,5 +40,4 @@ class _MyHomepageState extends State { ); } } - // #enddocregion ephemeral diff --git a/examples/testing/common_errors/lib/renderflex_overflow.dart b/examples/testing/common_errors/lib/renderflex_overflow.dart index 91f1c648f3..e919222b26 100644 --- a/examples/testing/common_errors/lib/renderflex_overflow.dart +++ b/examples/testing/common_errors/lib/renderflex_overflow.dart @@ -26,7 +26,6 @@ class ProblemWidget extends StatelessWidget { ], ); } - // #enddocregion problem } diff --git a/examples/testing/common_errors/lib/set_state_build.dart b/examples/testing/common_errors/lib/set_state_build.dart index 8222f9371e..027a7d4743 100644 --- a/examples/testing/common_errors/lib/set_state_build.dart +++ b/examples/testing/common_errors/lib/set_state_build.dart @@ -18,7 +18,6 @@ class ProblemWidget extends StatelessWidget { child: Column(children: [Text('Show Material Dialog')]), ); } - // #enddocregion problem } diff --git a/examples/testing/common_errors/lib/unbounded_height.dart b/examples/testing/common_errors/lib/unbounded_height.dart index 3683274e55..d94e556435 100644 --- a/examples/testing/common_errors/lib/unbounded_height.dart +++ b/examples/testing/common_errors/lib/unbounded_height.dart @@ -20,7 +20,6 @@ class ProblemWidget extends StatelessWidget { ), ); } - // #enddocregion problem } @@ -46,6 +45,5 @@ class SolutionWidget extends StatelessWidget { ), ); } - // #enddocregion solution } diff --git a/examples/testing/common_errors/lib/unbounded_width.dart b/examples/testing/common_errors/lib/unbounded_width.dart index 5a9504237a..8ea654d3d0 100644 --- a/examples/testing/common_errors/lib/unbounded_width.dart +++ b/examples/testing/common_errors/lib/unbounded_width.dart @@ -13,7 +13,6 @@ class ProblemWidget extends StatelessWidget { ), ); } - // #enddocregion problem } @@ -30,6 +29,5 @@ class SolutionWidget extends StatelessWidget { ), ); } - // #enddocregion solution } diff --git a/examples/testing/errors/lib/main.dart b/examples/testing/errors/lib/main.dart index 2cc2ea82de..9adfc3f815 100644 --- a/examples/testing/errors/lib/main.dart +++ b/examples/testing/errors/lib/main.dart @@ -36,5 +36,4 @@ class MyApp extends StatelessWidget { ); } } - // #enddocregion all-errors diff --git a/examples/testing/integration_tests/how_to/integration_test/counter_test.dart b/examples/testing/integration_tests/how_to/integration_test/counter_test.dart index 9f170c0fb8..34eddb9685 100644 --- a/examples/testing/integration_tests/how_to/integration_test/counter_test.dart +++ b/examples/testing/integration_tests/how_to/integration_test/counter_test.dart @@ -31,5 +31,4 @@ void main() { }); }); } - // #enddocregion initial diff --git a/examples/tools/lib/hot-reload/after.dart b/examples/tools/lib/hot-reload/after.dart index 9a0f973bc6..add9b06053 100644 --- a/examples/tools/lib/hot-reload/after.dart +++ b/examples/tools/lib/hot-reload/after.dart @@ -61,5 +61,4 @@ void onClick() { print(foo); print(bar); } - // #enddocregion const diff --git a/examples/tools/lib/hot-reload/before.dart b/examples/tools/lib/hot-reload/before.dart index d0ee66ac61..a0ef249bde 100644 --- a/examples/tools/lib/hot-reload/before.dart +++ b/examples/tools/lib/hot-reload/before.dart @@ -59,5 +59,4 @@ void onClick() { print(foo); print(bar); } - // #enddocregion const diff --git a/examples/tools/lib/hot-reload/foo_const.dart b/examples/tools/lib/hot-reload/foo_const.dart index fd183a5f5c..5ee1c20240 100644 --- a/examples/tools/lib/hot-reload/foo_const.dart +++ b/examples/tools/lib/hot-reload/foo_const.dart @@ -7,5 +7,4 @@ void onClick() { print(foo); print(bar); } - // #enddocregion const diff --git a/examples/tools/lib/hot-reload/getter.dart b/examples/tools/lib/hot-reload/getter.dart index e4339c84fd..df37f48280 100644 --- a/examples/tools/lib/hot-reload/getter.dart +++ b/examples/tools/lib/hot-reload/getter.dart @@ -7,5 +7,4 @@ void onClick() { print(foo); print(bar); } - // #enddocregion const diff --git a/examples/ui/actions_and_shortcuts/lib/samples.dart b/examples/ui/actions_and_shortcuts/lib/samples.dart index c4459c6974..b37300a0f1 100644 --- a/examples/ui/actions_and_shortcuts/lib/samples.dart +++ b/examples/ui/actions_and_shortcuts/lib/samples.dart @@ -29,7 +29,6 @@ class ShortcutsExample extends StatelessWidget { ), ); } - // #enddocregion shortcuts } @@ -88,7 +87,6 @@ class SelectAllExample extends StatelessWidget { child: child, ); } - // #enddocregion select-all-usage } @@ -142,7 +140,6 @@ class HandlerExample extends StatelessWidget { ), ); } - // #enddocregion handler } @@ -192,7 +189,6 @@ class LoggingActionDispatcherExample extends StatelessWidget { ), ); } - // #enddocregion logging-action-dispatcher-usage } @@ -231,6 +227,5 @@ class _CallbackShortcutsExampleState extends State { ), ); } - // #enddocregion callback-shortcuts } diff --git a/examples/ui/focus/lib/samples.dart b/examples/ui/focus/lib/samples.dart index 9605dd56d3..6801e522cd 100644 --- a/examples/ui/focus/lib/samples.dart +++ b/examples/ui/focus/lib/samples.dart @@ -15,7 +15,6 @@ class AbsorbKeysExample extends StatelessWidget { child: child, ); } - // #enddocregion absorb-keys } @@ -34,7 +33,6 @@ class NoAExample extends StatelessWidget { child: const TextField(), ); } - // #enddocregion no-letter-a } @@ -54,7 +52,6 @@ class BuilderExample extends StatelessWidget { ), ); } - // #enddocregion builder } @@ -89,5 +86,4 @@ class OrderedButtonRow extends StatelessWidget { ); } } - // #enddocregion ordered-button-row diff --git a/examples/visual_debugging/lib/highlight_repaints.dart b/examples/visual_debugging/lib/highlight_repaints.dart index 2ede3efaa3..29bfd3bdf5 100644 --- a/examples/visual_debugging/lib/highlight_repaints.dart +++ b/examples/visual_debugging/lib/highlight_repaints.dart @@ -36,5 +36,4 @@ class AreaRepaintsPage extends StatelessWidget { ); } } - // #enddocregion area-repaints diff --git a/examples/visual_debugging/lib/oversized_images.dart b/examples/visual_debugging/lib/oversized_images.dart index 1204705b6f..07cc96edcc 100644 --- a/examples/visual_debugging/lib/oversized_images.dart +++ b/examples/visual_debugging/lib/oversized_images.dart @@ -15,5 +15,4 @@ class ResizedImage extends StatelessWidget { return Image.asset('dash.png', cacheHeight: 213, cacheWidth: 392); } } - // #enddocregion resized-image diff --git a/firebase.json b/firebase.json index 68d30ebbd0..f68b237651 100644 --- a/firebase.json +++ b/firebase.json @@ -467,6 +467,7 @@ { "source": "/go/flavor-specific-assets", "destination": "https://docs.google.com/document/d/1_3GwdRZ1WPBqR9koNxESfAXHqynv36__ctMqN-NRG0k/edit?usp=sharing", "type": 301 }, { "source": "/go/floating-snackbar-offset", "destination": "https://docs.google.com/document/d/1elP-y83PtvfAZHNcpHCtnOFhZO9VnnlobwfQ33QO4hg/edit", "type": 301 }, { "source": "/go/floating-widgetspans", "destination": "https://docs.google.com/document/d/1I-VqCxvszXGAas_6EE9b6ZIzyMY3HjxDxGW9_DWWd7M/edit", "type": 301 }, + { "source": "/go/flutter-android-embedder-api-migration", "destination": "https://docs.google.com/document/d/1pFgFYzAKrIFEQQfSz6NbOvKXG6K3oksPQqhKSQZ7t68", "type": 301 }, { "source": "/go/flutter-android-emulator-testing", "destination": "https://docs.google.com/document/d/10wYUcLcSTF4Epg2EUGoBqOkkOe4zxKHvYKjXFZAOgGs/edit?usp=sharing&resourcekey=0-pltjPvEtVezXDADMbUwFHQ", "type": 301 }, { "source": "/go/flutter-dependency-hosting", "destination": "https://docs.google.com/document/d/1EKb1VypI0ArXqwBWJKGTsiQ2WU0ruYb55JpIeKxWaDs/edit", "type": 301 }, { "source": "/go/flutter-developer-tooling-plugins", "destination": "https://docs.google.com/document/d/189A-T-pcHPuds8pOtbzLS8Wl6Hr0AIAIl0aRTPvLKec/", "type": 301 }, @@ -614,6 +615,7 @@ { "source": "/go/material-date-picker-redesign", "destination": "https://docs.google.com/document/d/1AGKjBvO7EL2PuJGcwaa2PoCusjtTAvpYO7i_3A2vVpc/edit", "type": 301 }, { "source": "/go/material-symbols", "destination": "https://docs.google.com/document/d/1UHRKDl8-lzl_hW_K2AHnpMwvdPo0vGPbDI7mqACWXJY/edit?usp=sharing", "type": 301 }, { "source": "/go/material-theme-system-updates", "destination": "https://docs.google.com/document/d/1kzIOQN4QYfVsc5lMZgy_A-FWGXBAJBMySGqZqsJytcE/edit", "type": 301 }, + { "source": "/go/material-ui-cupertino-ui-architecture", "destination": "https://docs.google.com/document/d/1TW42GcjEWoPZK7Y2cZr38zjoRQ1T4gJBujXIqPL_lOw/edit?usp=sharing", "type": 301 }, { "source": "/go/max-length-enforcement", "destination": "https://docs.google.com/document/d/1S900lQaTPOsePnIeE7o3-Ia8f39VZaSv0JnjNyBfCvU", "type": 301 }, { "source": "/go/medium-sized-code-samples", "destination": "https://docs.google.com/document/d/1-jjYru2ljRSRSY4hn4qwLj9oQj8UiqrDOgY10-FE2tY/edit?usp=sharing", "type": 301 }, { "source": "/go/migrate-flutter-wiki", "destination": "https://docs.google.com/document/d/1naONKJd-eqPj8zEVfHfjGa5TCZNyJErBY4ca1gjSCq4/edit?usp=sharing", "type": 301 }, @@ -919,6 +921,7 @@ { "source": "/to/web-renderers", "destination": "/platform-integration/web/renderers", "type": 301 }, { "source": "/to/widget-previews", "destination": "/tools/widget-previewer", "type": 301 }, { "source": "/to/widget-testing", "destination": "/cookbook/testing/widget/introduction", "type": 301 }, + { "source": "/to/windowing-example", "destination": "https://github.com/flutter/flutter/tree/main/examples/multiple_windows", "type": 301 }, { "source": "/to/windows-android-setup", "destination": "/platform-integration/android/setup", "type": 301 }, { "source": "/to/windows-ffi", "destination": "/platform-integration/windows/building#integrating-with-windows", "type": 301 }, { "source": "/to/windows-setup", "destination": "/platform-integration/windows/setup", "type": 301 }, diff --git a/packages/excerpter/test_data/example/plaster.dart b/packages/excerpter/test_data/example/plaster.dart index d9054f7c89..fd66f89d6f 100644 --- a/packages/excerpter/test_data/example/plaster.dart +++ b/packages/excerpter/test_data/example/plaster.dart @@ -40,5 +40,4 @@ void template() { print('Templated plaster here.'); // #docregion template } - // #enddocregion template diff --git a/packages/excerpter/test_data/example/transforms.dart b/packages/excerpter/test_data/example/transforms.dart index 4b1f5b573b..250943f52b 100644 --- a/packages/excerpter/test_data/example/transforms.dart +++ b/packages/excerpter/test_data/example/transforms.dart @@ -2,5 +2,4 @@ void indent() { print('indent'); } - // #enddocregion indent diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md index d49cc03d02..c6fd44df1c 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-objective-c-plugin.md @@ -102,12 +102,16 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica // If the plugin name contains "_", replace with "-" for the library name .library(name: "plugin-name", targets: ["plugin_name"]) ], - dependencies: [], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework") + ], targets: [ .target( // TODO: Update your target name. name: "plugin_name", - dependencies: [], + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework") + ], resources: [ // TODO: If your plugin requires a privacy manifest // (in other words, if it uses any required reason APIs), @@ -163,12 +167,16 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica // If the plugin name contains "_", replace with "-" for the library name .library(name: [!"plugin-name"!], targets: [[!"plugin_name"!]]) ], - dependencies: [], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework") + ], targets: [ .target( // TODO: Update your target name. name: [!"plugin_name"!], - dependencies: [], + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework") + ], resources: [ // TODO: If your plugin requires a privacy manifest // (for example, if it uses any required reason APIs), @@ -326,6 +334,29 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica `ios/Assets`、`ios/Resources` 和 `ios/Classes` 目录现在应 为空,可以删除。 +1. Add the `FlutterFramework` as a dependency. + + 添加 `FlutterFramework` 为依赖项。 + + Update `Package.swift` to include `FlutterFramework`: + + 在 `Package.swift` 中添加 `FlutterFramework`: + + ```swift title="Package.swift" + dependencies: [ + [!.package(name: "FlutterFramework", path: "../FlutterFramework")!] + ], + targets: [ + .target( + // TODO: Update your target name. + name: "plugin_name", + dependencies: [ + [!.product(name: "FlutterFramework", package: "FlutterFramework")!] + ] + ) + ] + ``` + 1. If your header files are no longer in the same directory as your implementation files, you should update your import statements. diff --git a/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md b/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md index dead879f71..1d1784bc3d 100644 --- a/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md +++ b/sites/docs/src/_includes/docs/swift-package-manager/migrate-swift-plugin.md @@ -143,12 +143,16 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica // If the plugin name contains "_", replace with "-" for the library name .library(name: [!"plugin-name"!], targets: [[!"plugin_name"!]]) ], - dependencies: [], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework") + ], targets: [ .target( // TODO: Update your target name. name: [!"plugin_name"!], - dependencies: [], + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework") + ], resources: [ // TODO: If your plugin requires a privacy manifest // (e.g. if it uses any required reason APIs), update the PrivacyInfo.xcprivacy file @@ -203,25 +207,22 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica For more instructions, visit [Bundling resources with a Swift package][]. -[Bundling resources with a Swift package]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package - 将 `ios/Assets` 中的资源文件移动到 `ios/plugin_name/Sources/plugin_name`(或其子目录)。 如适用,将资源文件添加到 `Package.swift` 文件中。 - 更多说明请参阅 - [https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package)。 + 更多说明请参阅 [将资源打包到 Swift package 中][Bundling resources with a Swift package]。 1. Move all files from `ios/Classes` to `ios/plugin_name/Sources/plugin_name`. 将 `ios/Classes` 中的所有文件移动到 `ios/plugin_name/Sources/plugin_name`。 -1. Add the `FlutterFramework` as a dependency and update Dart and Flutter versions. +1. Add the `FlutterFramework` as a dependency. - 将 FlutterFramework 添加为依赖并更新 Dart 和 Flutter 版本。 + 将 `FlutterFramework` 添加为依赖。 Update `Package.swift` to include `FlutterFramework`: - 更新 `Package.swift` 以包含 `FlutterFramework`: + 在 `Package.swift` 中添加 `FlutterFramework`: ```swift title="Package.swift" dependencies: [ @@ -234,16 +235,8 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica dependencies: [ [!.product(name: "FlutterFramework", package: "FlutterFramework")!] ], - ``` - - In `pubspec.yaml`, update versions to: - - 在 `pubspec.yaml` 中,将版本更新为: - - ```yaml title="pubspec.yaml" - environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + ) + ] ``` 1. The `ios/Assets`, `ios/Resources`, and `ios/Classes` directories should now @@ -329,8 +322,6 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica 这可避免与其他 package 中的目标冲突。 ::: -[`PackageDescription`]: {{site.apple-dev}}/documentation/packagedescription - 1. Update your `ios/plugin_name.podspec` to point to new paths. 更新 `ios/plugin_name.podspec`,使其指向新路径。 @@ -514,3 +505,5 @@ The example below uses `ios`, replace `ios` with `macos` or `darwin`, as applica [removeSPM]: /packages-and-plugins/swift-package-manager/for-app-developers#how-to-remove-swift-package-manager-integration [update unit tests in the plugin's example app]: /packages-and-plugins/swift-package-manager/for-plugin-authors/#how-to-update-unit-tests-in-a-plugins-example-app [testing plugins]: /testing/testing-plugins +[Bundling resources with a Swift package]: {{site.apple-dev}}/documentation/xcode/bundling-resources-with-a-swift-package +[`PackageDescription`]: {{site.apple-dev}}/documentation/packagedescription diff --git a/sites/docs/src/content/ai/best-practices/structure-output.md b/sites/docs/src/content/ai/best-practices/structure-output.md index 3893074582..990c2b9682 100644 --- a/sites/docs/src/content/ai/best-practices/structure-output.md +++ b/sites/docs/src/content/ai/best-practices/structure-output.md @@ -3,8 +3,8 @@ title: 结构与输出 sidenav: ai # description: > -# Learn how to use structured input and output schemas to receive reliable, -# parsable JSON data from an LLM. +# Learn how to use structured input and output schemas to +# receive reliable, parsable JSON data from an LLM. description: > 了解如何使用结构化输入与输出 schema,从 LLM 获得可靠、可解析的 JSON 数据。 prev: diff --git a/sites/docs/src/content/ai/evals.md b/sites/docs/src/content/ai/evals.md index 35f66c6a19..e4985cc52b 100644 --- a/sites/docs/src/content/ai/evals.md +++ b/sites/docs/src/content/ai/evals.md @@ -1,9 +1,9 @@ --- -title: AI Evaluations +title: AI evaluations sidenav: ai description: > - Learn about Dart and Flutter's evaluation frameworks for measuring AI tooling - reliability. + Learn about Dart and Flutter's evaluation frameworks for + measuring AI tooling reliability. --- :::experimental diff --git a/sites/docs/src/content/ai/genui/get-started.md b/sites/docs/src/content/ai/genui/get-started.md index 6c3276813b..5c1782b112 100644 --- a/sites/docs/src/content/ai/genui/get-started.md +++ b/sites/docs/src/content/ai/genui/get-started.md @@ -108,13 +108,13 @@ To connect to Gemini using the Vertex AI for Firebase SDK, follow these instruct 按 [Firebase Flutter 设置指南][Firebase's Flutter setup guide] 的前三步将 Firebase 添加到应用。 - 4. Use `dart pub add` to add `genui` and `firebase_vertex_ai` as + 4. Use `dart pub add` to add `genui` and `firebase_ai` as dependencies in your `pubspec.yaml` file: - 使用 `dart pub add` 在 `pubspec.yaml` 中添加 `genui` 与 `firebase_vertex_ai` 依赖: + 使用 `dart pub add` 在 `pubspec.yaml` 中添加 `genui` 与 `firebase_ai` 依赖: ```console - $ dart pub add genui firebase_vertex_ai + $ dart pub add genui firebase_ai ``` 5. In your app's `main` method, ensure that the widget @@ -144,9 +144,9 @@ To connect to Gemini using the Vertex AI for Firebase SDK, follow these instruct ```dart import 'package:genui/genui.dart'; - import 'package:firebase_vertex_ai/firebase_vertex_ai.dart'; + import 'package:firebase_ai/firebase_ai.dart'; - final catalog = Catalog(components: [ + final catalog = Catalog([ // ... ]); final catalogs = [catalog]; @@ -158,8 +158,8 @@ To connect to Gemini using the Vertex AI for Firebase SDK, follow these instruct systemPromptFragments: ['You are a helpful assistant.'], ); - final model = FirebaseVertexAI.instance.generativeModel( - model: 'gemini-2.5-flash', + final model = FirebaseAI.vertexAI().generativeModel( + model: 'gemini-3.5-flash', systemInstruction: Content.system(promptBuilder.systemPromptJoined()), ); @@ -217,14 +217,14 @@ Follow these instructions: 请按照以下说明操作: 1. Set up dependencies: - Use `dart pub add` to add `genui`, `genui_a2a`, and `a2a` as + Use `dart pub add` to add `genui` and `genui_a2a` as dependencies in your `pubspec.yaml` file. 设置依赖: 使用 `dart pub add` 在 `pubspec.yaml` 文件中添加 `genui`、`genui_a2a` 和 `a2a` 依赖。 ```console - $ dart pub add genui genui_a2a a2a + $ dart pub add genui genui_a2a ``` 2. Initialize `SurfaceController`: @@ -355,15 +355,12 @@ Follow these instructions: void _handleSubmitted(String text) async { if (text.isEmpty) return; _textController.clear(); - final message = ChatMessage.user(TextPart(text)); + final message = ChatMessage.user(text); setState(() { _messages.insert(0, message); }); - final responseText = await _connector.connectAndSend( - message, - clientCapabilities: A2uiClientCapabilities(supportedProtocols: ['a2ui/0.9.0']) - ); + final responseText = await _connector.connectAndSend(message); // Handling response depends on your app's logic } @@ -394,8 +391,7 @@ Follow these instructions: SizedBox( height: 300, child: Surface( - surfaceController: _surfaceController, - surfaceId: 'main_surface', + surfaceContext: _surfaceController.contextFor('main_surface'), ), ), ], @@ -411,13 +407,13 @@ Follow these instructions: children: [ Container( margin: const EdgeInsets.only(right: 16.0), - child: CircleAvatar(child: Text(message.role == Role.user ? 'U' : 'A')), + child: CircleAvatar(child: Text(message.role == ChatMessageRole.user ? 'U' : 'A')), ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(message.role == Role.user ? 'User' : 'Agent', + Text(message.role == ChatMessageRole.user ? 'User' : 'Agent', style: const TextStyle(fontWeight: FontWeight.bold)), Container( margin: const EdgeInsets.only(top: 5.0), @@ -801,18 +797,13 @@ To add your own widgets, use the following instructions. name: 'RiddleCard', dataSchema: _schema, widgetBuilder: - ({ - required data, - required id, - required buildChild, - required dispatchEvent, - required context, - required dataContext, - }) { - final json = data as Map; + (itemContext) { + final json = itemContext.data as Map; final question = json['question'] as String; final answer = json['answer'] as String; + final context = itemContext.buildContext; + return Container( constraints: const BoxConstraints(maxWidth: 400), decoration: BoxDecoration(border: Border.all()), @@ -840,7 +831,7 @@ To add your own widgets, use the following instructions. ```dart _surfaceController = SurfaceController( - catalogs: [BasicCatalogItems.asCatalog().copyWith([riddleCard])], + catalogs: [BasicCatalogItems.asCatalog().copyWith(newItems: [riddleCard])], ); ``` @@ -914,6 +905,7 @@ the AI would generate: ```json { + "id": "welcome-text", "component": "Text", "text": "Welcome to GenUI", "variant": "h1" @@ -926,6 +918,7 @@ the AI would generate: ```json { + "id": "image", "component": "Image", "url": "https://example.com/image.png", "variant": "mediumFeature" @@ -988,15 +981,17 @@ a system instruction for the agent with the line 因此 [先前的示例][instruction-example] 为智能体包含系统指令, 其中有「Every time I give you a word, you should generate UI that...」这样的表述: -```dart highlightLines=4-5 +```dart highlightLines=5-6 final promptBuilder = PromptBuilder.chat( catalog: catalog, - instructions: ''' + systemPromptFragments: [ + ''' You are an expert in creating funny riddles. Every time I give you a word, you should generate UI that displays one new riddle related to that word. Each riddle should have both a question and an answer. - ''', + ''' + ], ); ``` @@ -1019,7 +1014,7 @@ enable logging in your `main` method. import 'package:logging/logging.dart'; import 'package:genui/genui.dart'; -final logger = configureGenUiLogging(level: Level.ALL); +final logger = configureLogging(level: Level.ALL); void main() async { logger.onRecord.listen((record) { diff --git a/sites/docs/src/content/app-architecture/design-patterns/optimistic-state.md b/sites/docs/src/content/app-architecture/design-patterns/optimistic-state.md index b2b3deafc8..69bfc3821f 100644 --- a/sites/docs/src/content/app-architecture/design-patterns/optimistic-state.md +++ b/sites/docs/src/content/app-architecture/design-patterns/optimistic-state.md @@ -376,7 +376,6 @@ class SubscribeButtonViewModel extends ChangeNotifier { notifyListeners(); } } - } ``` @@ -650,7 +649,6 @@ class _SubscribeButtonState extends State { ).showSnackBar(const SnackBar(content: Text('Failed to subscribe'))); } } - } class SubscribeButtonStyle { @@ -701,7 +699,6 @@ class SubscribeButtonViewModel extends ChangeNotifier { notifyListeners(); } } - } /// Repository of subscriptions. diff --git a/sites/docs/src/content/cookbook/effects/parallax-scrolling.md b/sites/docs/src/content/cookbook/effects/parallax-scrolling.md index 426bfabfd8..60e212a462 100644 --- a/sites/docs/src/content/cookbook/effects/parallax-scrolling.md +++ b/sites/docs/src/content/cookbook/effects/parallax-scrolling.md @@ -691,7 +691,6 @@ class ParallaxFlowDelegate extends FlowDelegate { required this.listItemContext, required this.backgroundImageKey, }) : super(repaint: scrollable.position); -} ``` Congratulations! @@ -851,7 +850,6 @@ class ParallaxFlowDelegate extends FlowDelegate { required this.backgroundImageKey, }) : super(repaint: scrollable.position); - final ScrollableState scrollable; final BuildContext listItemContext; final GlobalKey backgroundImageKey; @@ -909,7 +907,6 @@ class ParallaxFlowDelegate extends FlowDelegate { listItemContext != oldDelegate.listItemContext || backgroundImageKey != oldDelegate.backgroundImageKey; } - } class Parallax extends SingleChildRenderObjectWidget { diff --git a/sites/docs/src/content/cookbook/navigation/returning-data.md b/sites/docs/src/content/cookbook/navigation/returning-data.md index 09ddf5fa17..eb5067c8f3 100644 --- a/sites/docs/src/content/cookbook/navigation/returning-data.md +++ b/sites/docs/src/content/cookbook/navigation/returning-data.md @@ -323,7 +323,6 @@ class _SelectionButtonState extends State { ..removeCurrentSnackBar() ..showSnackBar(SnackBar(content: Text('$result'))); } - } class SelectionScreen extends StatelessWidget { diff --git a/sites/docs/src/content/cookbook/persistence/reading-writing-files.md b/sites/docs/src/content/cookbook/persistence/reading-writing-files.md index 10465f6558..e860da3082 100644 --- a/sites/docs/src/content/cookbook/persistence/reading-writing-files.md +++ b/sites/docs/src/content/cookbook/persistence/reading-writing-files.md @@ -114,6 +114,7 @@ You can find the path to the documents directory as follows: ```dart import 'package:path_provider/path_provider.dart'; + // ··· Future get _localPath async { final directory = await getApplicationDocumentsDirectory(); @@ -246,7 +247,6 @@ class CounterStorage { // Write the file return file.writeAsString('$counter'); } - } class FlutterDemo extends StatefulWidget { diff --git a/sites/docs/src/content/cookbook/plugins/google-mobile-ads.md b/sites/docs/src/content/cookbook/plugins/google-mobile-ads.md index 6a0cec053a..eb4757a123 100644 --- a/sites/docs/src/content/cookbook/plugins/google-mobile-ads.md +++ b/sites/docs/src/content/cookbook/plugins/google-mobile-ads.md @@ -552,7 +552,6 @@ class _MyBannerAdWidgetState extends State { // Start loading. bannerAd.load(); } - } ``` diff --git a/sites/docs/src/content/data-and-backend/google-apis.md b/sites/docs/src/content/data-and-backend/google-apis.md index 601481d5d0..a6d4aad5dd 100644 --- a/sites/docs/src/content/data-and-backend/google-apis.md +++ b/sites/docs/src/content/data-and-backend/google-apis.md @@ -130,7 +130,7 @@ YouTube data, authenticate the user with ```dart -/// Provides the `YouTubeApi` class. +// Provides the `YouTubeApi` class. import 'package:googleapis/youtube/v3.dart'; ``` @@ -208,7 +208,6 @@ listen to authentication events to determine if a user signed in. ```dart highlightLines=1,7,9-12 GoogleSignInAccount? _currentUser; - @override void initState() { super.initState(); diff --git a/sites/docs/src/content/deployment/android.md b/sites/docs/src/content/deployment/android.md index 17e88cc57b..ee5fec4e50 100644 --- a/sites/docs/src/content/deployment/android.md +++ b/sites/docs/src/content/deployment/android.md @@ -970,6 +970,19 @@ aren't applicable to their device's architecture. 这种 APK 文件将会在比单独构建的 APK 文件尺寸要大, 会导致用户下载一些不适用于其设备架构的二进制文件。 +When using split APKs, the framework adds `ABI_VERSION * 1000` +to the version code. This is because the Google Play Store +[doesn't allow](https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) +multiple APKs for the same app to have the same version code. +To force the default version code, specify the +`-P force-version-code-ignoring-abi=true` flag during the build. + +使用拆分 APK 的时候,框架会在版本代码中添加 `ABI_VERSION * 1000`。 +这是因为 Google Play Store +[不允许](https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) +同一应用的多个 APK 具有相同的版本代码。 +如果要强制使用默认版本代码,请在构建的时候指定 `-P force-version-code-ignoring-abi=true`。 + [obfuscating your Dart code]: /deployment/obfuscate ### Install an APK on a device diff --git a/sites/docs/src/content/flutter-for/android-devs.md b/sites/docs/src/content/flutter-for/android-devs.md index efa12b63f1..dcdc29e45d 100644 --- a/sites/docs/src/content/flutter-for/android-devs.md +++ b/sites/docs/src/content/flutter-for/android-devs.md @@ -1137,7 +1137,6 @@ class _SampleAppPageState extends State { .cast>(); }); } - } ``` @@ -1423,7 +1422,6 @@ class _SampleAppPageState extends State { port.send([msg, response.sendPort]); return response.first; } - } ``` diff --git a/sites/docs/src/content/platform-integration/web/initialization.md b/sites/docs/src/content/platform-integration/web/initialization.md index a7462f7a13..2a73942354 100644 --- a/sites/docs/src/content/platform-integration/web/initialization.md +++ b/sites/docs/src/content/platform-integration/web/initialization.md @@ -242,6 +242,29 @@ The initialization process is split into the following stages: [embedded-mode]: {{site.docs}}/platform-integration/web/embedding-flutter-web/#embedded-mode [js-promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise +:::warning +When you provide your own `onEntrypointLoaded` callback, the `config` +that you pass to `_flutter.loader.load()` is **not** forwarded to the +engine automatically. Flutter only applies that `config` for you when +you omit `onEntrypointLoaded` and let the loader start the app. + +In a custom callback, pass the configuration to `initializeEngine()` +yourself, otherwise it's silently ignored: + +```js +_flutter.loader.load({ + onEntrypointLoaded: async function(engineInitializer) { + const appRunner = await engineInitializer.initializeEngine({ + // Set your run-time configuration here. + renderer: 'canvaskit', + }); + await appRunner.runApp(); + }, +}); +``` + +::: + ## Example: Display a progress indicator ## 示例:显示进度指示器 @@ -263,6 +286,8 @@ loading.textContent = "Loading Entrypoint..."; _flutter.loader.load({ onEntrypointLoaded: async function(engineInitializer) { loading.textContent = "Initializing engine..."; + // If you have a `config`, pass it here. The config given to `load()` + // is not forwarded when you supply your own `onEntrypointLoaded`. const appRunner = await engineInitializer.initializeEngine(); loading.textContent = "Running app..."; diff --git a/sites/docs/src/content/release/breaking-changes/index.md b/sites/docs/src/content/release/breaking-changes/index.md index a4400cc0e3..f0cac822a7 100644 --- a/sites/docs/src/content/release/breaking-changes/index.md +++ b/sites/docs/src/content/release/breaking-changes/index.md @@ -62,10 +62,12 @@ They're sorted by release and listed in alphabetical order: * [Added enabled property and made onChanged optional for DropdownButton][] * [Large screen orientation and resizability restrictions ignored on Android 17][] +* [OpenGL ES render-to-texture content is stored top-down][] * [Update semantics header and headingLevel behavior on iOS and Android][] [Added enabled property and made onChanged optional for DropdownButton]: /release/breaking-changes/dropdownbutton-enabled-property [Large screen orientation and resizability restrictions ignored on Android 17]: /release/breaking-changes/android-large-screens-restrictions-ignored +[OpenGL ES render-to-texture content is stored top-down]: /release/breaking-changes/opengles-render-to-texture-top-down [Update semantics header and headingLevel behavior on iOS and Android]: /release/breaking-changes/semantics-header-heading-level diff --git a/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers.md b/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers.md index 96f1cac1b3..2c034dbf21 100644 --- a/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers.md +++ b/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers.md @@ -4,8 +4,6 @@ description: >- Migrate Flutter apps to use built-in Kotlin. --- -## Migrate - This guide outlines the migration steps specifically for app developers. These instructions assume you are updating from @@ -13,25 +11,36 @@ an AGP version created before 9.0.0 to an AGP version 9.0.0+. You should also use the minimum compatible dependency versions listed in the [Android Gradle Plugin docs][AGP block]. -### Verify flags in properties file +:::note +To update Flutter plugins to use built-in Kotlin, +follow the [migration guide for plugin authors][]. +::: + +[AGP block]: {{site.android-dev}}/build/releases/gradle-plugin +[migration guide for plugin authors]: /release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors + + + +## Verify flags in the Gradle properties file Flutter sets the default behavior to use the legacy Kotlin Gradle Plugin (KGP) -and the old AGP DSL types to support projects that have not yet migrated. +and the old AGP DSL types to support projects that haven't yet migrated. The Flutter migrator tool automatically adds `android.builtInKotlin=false` and `android.newDsl=false` to your `gradle.properties` file. If these flags are missing from your `gradle.properties` file, -the Flutter tool automatically adds them when you next build or run your app -using `flutter run` or `flutter build apk`. +the Flutter tool automatically adds them when you +next build or run your app using `flutter run` or `flutter build apk`. -Alternatively, building the project using Android Studio tooling also adds -these flags automatically. +Alternatively, building the project using Android Studio tooling also +adds these flags automatically. Once the process completes, verify that the flags have been added. -For more details, see [Issue #183910]. +For more details, see Flutter [issue #183910][issue-183910]. -All add-to-app projects must manually add `android.builtInKotlin=false` -and `android.newDsl=false` to the Android host app's `gradle.properties` file. -The Flutter migrator tool cannot run during add-to-app Android host app builds +All add-to-app projects must manually add +`android.builtInKotlin=false` and `android.newDsl=false` to +the Android host app's `gradle.properties` file. +The Flutter migrator tool can't run during add-to-app Android host app builds because the host app is a pure native Android project. ```properties diff title="/gradle.properties" @@ -42,26 +51,26 @@ because the host app is a pure native Android project. :::note If your app doesn't apply -the `kotlin-android` plugin (also called Kotlin Gradle Plugin), -then you only need to add `android.newDsl=false` and do not need -further migration. +the `kotlin-android` plugin (also called the Kotlin Gradle Plugin), +then you only need to add `android.newDsl=false` and +don't need to complete any further migration steps. ::: -### Update the Gradle file +## Update the Gradle file -First, find the `kotlin-android` plugin (or the `org.jetbrains.kotlin.android` -plugin). +First, find the `kotlin-android` plugin +(or the `org.jetbrains.kotlin.android` plugin). It is likely located in the `plugins` block of the `/android/app/build.gradle` or the `/android/app/build.gradle.kts` file. If you use the legacy `apply` syntax, it will be located in -the Groovy-based `/android/app/build.gradle` file, as this syntax is -not supported in Kotlin DSL. +the Groovy-based `/android/app/build.gradle` file, +as this syntax is not supported in Kotlin DSL. -The following examples demonstrate how to migrate a Flutter Android app -and an add-to-app Android host app: +The following examples demonstrate how to +migrate a Flutter Android app and an add-to-app Android host app: -#### Migrate your Flutter Android app +### Migrate your Flutter Android app @@ -173,6 +182,7 @@ Next, remove the `kotlin-android` plugin and the `kotlinOptions` block: // ... } ``` + Add the `kotlin.compilerOptions{}` DSL block with the following: ```groovy diff title="/android/app/build.gradle" @@ -207,7 +217,7 @@ kotlin { -#### Migrate your add-to-app Android host app +### Migrate your add-to-app Android host app Android native apps use the `alias` keyword to apply plugins, which is incompatible with the legacy `apply()` syntax. @@ -250,6 +260,7 @@ Next, remove the `kotlin-android` plugin and the `kotlinOptions` block: // ... } ``` + Add the `kotlin.compilerOptions{}` DSL block with the following: ```kotlin diff title="/android/app/build.gradle.kts" @@ -283,75 +294,84 @@ kotlin { // ... ``` -### Validate +## Validate -Execute `flutter run` or `flutter build apk` to confirm that -your app builds and launches on a connected Android device or emulator. +Execute `flutter run` or `flutter build apk` to +confirm that your app builds and +launches on a connected Android device or emulator. -If your app fails to build because you are using an unmigrated Flutter plugin, +If your app fails to build because +you are using an unmigrated Flutter plugin, follow the instructions below: -### Report incompatible Kotlin Gradle Plugin usage to plugin authors +## Report incompatible Kotlin Gradle Plugin usage to plugin authors Follow these instructions only if your app uses a Flutter plugin -that has not yet migrated to built-in Kotlin. +that hasn't yet migrated to built-in Kotlin. -1. Find the repository of the unmigrated Flutter plugin by searching for the - plugin name on [pub.dev](https://pub.dev) or online. -2. Refer to the plugin CHANGELOG to confirm that no existing version - has migrated to built-in Kotlin. -3. Report an issue to the plugin authors, informing them that the Kotlin - Gradle Plugin is incompatible and won't be supported in a future version - of Flutter. +1. Find the repository of the unmigrated Flutter plugin by + searching for the plugin name on [pub.dev]({{site.pub}}) or online. +1. Check the plugin's changelog to confirm that + no existing version has migrated to built-in Kotlin. +1. Report an issue to the plugin authors, + informing them that the Kotlin Gradle Plugin is incompatible and + won't be supported in a future version of Flutter. You can use the following template for the issue: -**Issue Title:** Migrate Plugin to Built-in Kotlin +**Issue Title:** Migrate plugin to built-in Kotlin **Issue Body:** + +```markdown I am using `` in my Flutter app. Starting with Android Gradle Plugin (AGP) 9.0, support for applying the Kotlin Gradle Plugin (KGP) has been removed. -Because this plugin applies KGP, it causes a compilation error -that prevents my app from building. -Here is an example of the error [Issue #181383][]. +Because this plugin applies KGP, +it causes a compilation error that prevents my app from building. +Flutter [issue #181383](https://github.com/flutter/flutter/issues/181383) +includes an example of the error. Flutter has temporarily added support to allow KGP -while apps and plugins migrate to AGP 9.0+, +while apps and plugins migrate to AGP 9.0 or later, but this support will be removed in a future version of Flutter. -Please migrate this plugin to use built-in Kotlin to ensure your plugin -users can successfully build their apps in future versions of Flutter. +Please migrate this plugin to use built-in Kotlin to +ensure your plugin users can successfully +build their apps in future versions of Flutter. -Here is the Flutter [migration guide for plugin authors][plugin-migration-guide]. +Here is the Flutter +[migration guide for plugin authors](https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors). +``` -Please be respectful and mindful of the plugin repository's rules and code -of conduct when reporting issues and interacting with plugin authors. +Please be respectful and mindful of the +plugin repository's rules and code of conduct when +reporting issues and interacting with plugin authors. For reference, see the [Flutter Code of Conduct][Code of Conduct]. +[Code of Conduct]: {{site.repo.flutter}}/blob/main/CODE_OF_CONDUCT.md + ## Next steps -See the [migration overview](./) for next steps. +For next steps, +see the [built-in Kotlin migration overview][migration-overview]. + +[migration-overview]: /release/breaking-changes/migrate-to-built-in-kotlin ## References Relevant issues: -- [Issue #183910][]: Add Disable Built-in Kotlin and new DSL Migrators -- [Issue #181383][]: Flutter plugins should support AGP 9.0.0 +- [Issue #183910][issue-183910]: Add Disable Built-in Kotlin and new DSL Migrators +- [Issue #181383][issue-181383]: Flutter plugins should support AGP 9.0.0 -The Gradle build files in your app vary based on the Flutter version -used when your app was created. +The Gradle build files in your app vary based on +the Flutter version used when your app was created. Consider staying up to date with the latest version of the build files by periodically running `flutter upgrade` -in your app's directory. - -[AGP block]: {{site.android-dev}}/build/releases/gradle-plugin - -[Issue #183910]: {{site.github}}/flutter/flutter/issues/183910 -[Issue #181383]: {{site.github}}/flutter/flutter/issues/181383 +in your app's root directory. -[plugin-migration-guide]: {{site.flutter-docs}}/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors -[Code of Conduct]: https://github.com/flutter/flutter/blob/master/CODE_OF_CONDUCT.md +[issue-183910]: {{site.repo.flutter}}/issues/183910 +[issue-181383]: {{site.repo.flutter}}/issues/181383 diff --git a/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors.md b/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors.md index ceb6c4ed7c..67f5398f41 100644 --- a/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors.md +++ b/sites/docs/src/content/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors.md @@ -4,29 +4,35 @@ description: >- Migrate Flutter plugins to use built-in Kotlin. --- -## Migrate your Flutter plugin - This guide outlines the migration steps specifically for plugin authors. -### Update the Gradle file +:::note +To update Flutter apps to use built-in Kotlin, +follow the [migration guide for app developers][]. +::: + +[migration guide for app developers]: /release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers -The following steps assume you can update your plugin's Flutter SDK minimum -to 3.44. If you cannot update the Flutter SDK minimum to 3.44, follow the -instructions for -[supporting Flutter versions earlier than 3.44][flutter-sdk-minimum-below-3.44]. +## Update the Gradle file -First, find the `kotlin-android` plugin (or the `org.jetbrains.kotlin.android` -plugin). +The following steps assume you can +update your plugin's Flutter SDK minimum to 3.44. +If you can't update the Flutter SDK minimum to 3.44, +follow the instructions to +[support Flutter versions earlier than 3.44][flutter-sdk-minimum-below-3.44]. + +First, find the `kotlin-android` plugin +(or the `org.jetbrains.kotlin.android` plugin). It is likely located in the `plugins` block of the `/build.gradle` or the `/build.gradle.kts` file. -If you use the legacy `apply` syntax, it will be located in -the Groovy-based `/build.gradle` file, as this syntax is -not supported in Kotlin DSL. +If you use the legacy `apply` syntax, +it will be located in the Groovy-based `/build.gradle` file, +as this syntax isn't supported in Kotlin DSL. The following examples demonstrate how to migrate a Flutter plugin: - + **Before**: @@ -100,7 +106,7 @@ kotlin { ``` - + **Before**: @@ -135,6 +141,7 @@ Next, remove the `kotlin-android` plugin and the `kotlinOptions` block: // ... } ``` + Add the `kotlin.compilerOptions{}` DSL block with the following: ```groovy diff title="/android/build.gradle" @@ -168,7 +175,9 @@ kotlin { -### Update the plugin's `pubspec.yaml` +[flutter-sdk-minimum-below-3.44]: #support-flutter-versions-earlier-than-3-44 + +## Update the plugin's `pubspec.yaml` Using the `kotlin.compilerOptions {}` DSL block requires a minimum Kotlin Gradle Plugin (KGP) version of 2.0.0. @@ -205,15 +214,18 @@ environment: # ... ``` -## Supporting Flutter versions earlier than 3.44 + + +## Support Flutter versions earlier than 3.44 -If you updated your plugin's Flutter SDK minimum to 3.44, skip this section -and proceed to updating the plugin's `CHANGELOG.md`. +If you updated your plugin's Flutter SDK minimum to 3.44, +skip this section and proceed to +[updating the plugin's `CHANGELOG.md`](#update-the-plugins-changelog). -If you cannot update the plugin's Flutter SDK minimum to 3.44, you must make -the following changes to `/android/build.gradle` or -`/android/build.gradle.kts` to support apps on AGP < 9 -and AGP >= 9: +If you can't update the plugin's Flutter SDK minimum to 3.44, you must +make the following changes to `/android/build.gradle` or +`/android/build.gradle.kts` to +support apps on AGP versions less than 9 and versions on 9 or later. @@ -256,14 +268,14 @@ Next, remove the `kotlin-android` plugin and the `kotlinOptions` block: } ``` -Add a check to apply the Kotlin Gradle Plugin only when the app's Android -Gradle Plugin version is earlier than 9. +Add a check to apply the Kotlin Gradle Plugin only when +the app's Android Gradle Plugin version is less than version 9. ```kotlin diff title="/android/build.gradle.kts" + val agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.substringBefore('.').toInt() + + if (agpMajor < 9) { -+ apply(plugin = "org.jetbrains.kotlin.android") ++ apply(plugin = "org.jetbrains.kotlin.android") + } ``` @@ -341,8 +353,8 @@ Next, remove the `kotlin-android` plugin and the `kotlinOptions` block: } ``` -Add a check to apply the Kotlin Gradle Plugin only when the app's Android -Gradle Plugin version is earlier than 9. +Add a check to apply the Kotlin Gradle Plugin only when +the app's Android Gradle Plugin version is less than version 9. ```groovy diff title="/android/build.gradle" + def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int @@ -389,28 +401,31 @@ kotlin { -### Update the plugin's `CHANGELOG.md` + + +## Update the plugin's changelog -Include your changes in the CHANGELOG of the newly released plugin version: +Include your changes in the `CHANGELOG.md` file of +the newly released plugin version: ```markdown diff title="/CHANGELOG.md" + ## -+ - Updates minimum supported SDK version to Flutter 3.44/Dart 3.12. -+ - Migrates to built-in Kotlin ++ - Updates the minimum supported SDK version to Flutter 3.44/Dart 3.12. ++ - Migrates to built-in Kotlin. // ... ``` -### Validate +## Validate -Execute `flutter run` or `flutter build apk` to confirm that -your plugin example app builds and launches +Execute `flutter run` or `flutter build apk` to +confirm that your plugin example app builds and launches on a connected Android device or emulator. If your plugin example app also applies KGP, then you will also have to migrate the example app. -Follow the [migration guide for app developers][app-migration-guide] to migrate your example app. +To migrate your example app, +follow the [migration guide for app developers][app-migration-guide]. -[app-migration-guide]: {{site.flutter-docs}}/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers -[flutter-sdk-minimum-below-3.44]: {{site.flutter-docs}}/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors#supporting-flutter-versions-earlier-than-3-44 +[app-migration-guide]: /release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers diff --git a/sites/docs/src/content/release/breaking-changes/opengles-render-to-texture-top-down.md b/sites/docs/src/content/release/breaking-changes/opengles-render-to-texture-top-down.md new file mode 100644 index 0000000000..8051f25fb9 --- /dev/null +++ b/sites/docs/src/content/release/breaking-changes/opengles-render-to-texture-top-down.md @@ -0,0 +1,100 @@ +--- +title: OpenGL ES render-to-texture content is stored top-down +description: >- + Impeller's OpenGL ES backend now stores render-to-texture content + top-down, matching Metal and Vulkan, which can affect fragment shaders + and Flutter GPU apps that compensated for the previous bottom-up + orientation. +--- + +{% render "docs/breaking-changes.md" %} + +## Summary + +Impeller's OpenGL ES backend now stores render-to-texture content +top-down, the same as the Metal and Vulkan backends. +A fragment shader or Flutter GPU app that sampled a render-target texture +on OpenGL ES and added a vertical flip to compensate for the old +bottom-up orientation now renders that content upside down. + +## Background + +The OpenGL ES backend previously stored render-to-texture content +bottom-up, unlike the Metal and Vulkan backends. +The renderer carried that orientation difference through every texture +sample as a per-sampler Y-coordinate scale. +Impeller now absorbs the difference once, at the vertex stage, so +render-target textures are stored top-down on every backend. + +This change is invisible to the framework and to Flutter's 2D rendering. +Application code can only observe the old orientation through the +`FragmentShader` API and through Flutter GPU, the experimental +`flutter_gpu` package, where a shader samples a render-target texture +directly. + +## Migration guide + +Shaders written for OpenGL ES often flipped the Y coordinate inside an +`IMPELLER_TARGET_OPENGLES` block to make render-target textures match the +other backends. +Render-target textures are now top-down on every backend, so that flip is +no longer needed. + +Code before migration: + +```glsl +void main() { + vec2 uv = FlutterFragCoord().xy / u_size; +#ifdef IMPELLER_TARGET_OPENGLES + uv.y = 1.0 - uv.y; +#endif + fragColor = texture(u_texture, uv); +} +``` + +If the shader only needs to run on a Flutter release that includes this +change, remove the flip. + +Code after migration: + +```glsl +void main() { + vec2 uv = FlutterFragCoord().xy / u_size; + fragColor = texture(u_texture, uv); +} +``` + +To keep one source working across releases, guard the flip with the +`IMPELLER_OPENGLES_UNFLIPPED_DEPRECATED` macro. +That macro is only defined on releases that store render-target textures +top-down, so the flip still runs on older releases that need it. + +```glsl +void main() { + vec2 uv = FlutterFragCoord().xy / u_size; +#if defined(IMPELLER_TARGET_OPENGLES) && !defined(IMPELLER_OPENGLES_UNFLIPPED_DEPRECATED) + uv.y = 1.0 - uv.y; +#endif + fragColor = texture(u_texture, uv); +} +``` + +## Timeline + +Landed in version: not yet released
+In stable release: the next stable release after 3.44.0 + +## References + +GitHub issue: + +* [Issue 186554][] + +Relevant PRs: + +* [PR 186556][] +* [PR 187316][] + +[Issue 186554]: {{site.repo.flutter}}/issues/186554 +[PR 186556]: {{site.repo.flutter}}/pull/186556 +[PR 187316]: {{site.repo.flutter}}/pull/187316 diff --git a/sites/docs/src/content/tools/devtools/release-notes/release-notes-2.60.0.md b/sites/docs/src/content/tools/devtools/release-notes/release-notes-2.60.0.md new file mode 100644 index 0000000000..acf7ee27ad --- /dev/null +++ b/sites/docs/src/content/tools/devtools/release-notes/release-notes-2.60.0.md @@ -0,0 +1,62 @@ +--- +title: DevTools 2.60.0 release notes +shortTitle: 2.60.0 release notes +breadcrumb: 2.60.0 +description: Release notes for Dart and Flutter DevTools version 2.60.0. +showToc: false +--- + +The 2.60.0 release of the Dart and Flutter DevTools +includes the following changes among other general improvements. +To learn more about DevTools, check out the +[DevTools overview](/tools/devtools). + +## General updates + +- Fixed an issue where DevTools could get stuck in a disconnected state + (such as after a Mac goes to sleep) by adding a manual "Reconnect" button to + the disconnected screen. - + [#9838](https://github.com/flutter/devtools/issues/9838) +- Resolved several memory leaks. - + [#9857](https://github.com/flutter/devtools/pull/9857) +- Fixed a bug where highlighted search matches in tables were unreadable in + dark mode because the highlight color had become fully opaque. - + [#9863](https://github.com/flutter/devtools/pull/9863) +- Rejected absolute paths in DevTools server file reads so they + stay within the `~/.flutter-devtools/` directory and + can't resolve to arbitrary files on disk. - + [#9844](https://github.com/flutter/devtools/pull/9844) +- Validated the `devtoolsOptionsUri` parameter in the + extension enabled-state handler so it must be + a `file:` URI named `devtools_options.yaml`, + preventing the DevTools server from writing to arbitrary file paths. - + [#9834](https://github.com/flutter/devtools/pull/9834) + +## Inspector updates + +- Fixed an issue where the Inspector error badge count would + improperly increase or disappear during navigation. - + [#9524](https://github.com/flutter/devtools/issues/9524) + +## Performance updates + +- Fixed a bug where the selected feature tab wasn't + restored when loading exported Performance data. - + [#9861](https://github.com/flutter/devtools/pull/9861) + +## Network profiler updates + +- Fixed the Network tab search field becoming disabled + after clearing all requests, + so the search query can now be edited at any time. - + [#9855](https://github.com/flutter/devtools/pull/9855) + +## Deep links tool updates + +- Only validate deep links when connected to a Flutter app. - + [#8081](https://github.com/flutter/devtools/issues/8081) + +## Full commit history + +To find a complete list of changes in this release, check out the +[DevTools git log](https://github.com/flutter/devtools/tree/v2.60.0). diff --git a/sites/docs/src/content/ui/interactivity/actions-and-shortcuts.md b/sites/docs/src/content/ui/interactivity/actions-and-shortcuts.md index df46dc8fed..619ef82924 100644 --- a/sites/docs/src/content/ui/interactivity/actions-and-shortcuts.md +++ b/sites/docs/src/content/ui/interactivity/actions-and-shortcuts.md @@ -451,14 +451,12 @@ Widget build(BuildContext context) { The `Actions` widget only invokes actions when `isEnabled(Intent intent)` returns true, allowing the action to decide if the dispatcher should consider it -for invocation. If the action isn't enabled, then the `Actions` widget gives -another enabled action higher in the widget hierarchy (if it exists) a chance to -execute. +for invocation. If the action isn't enabled, the action is not invoked and the +framework stops searching for matching actions at that point. `Actions` widget 仅在 `isEnabled(Intent intent)` 返回 true 时调用操作, 允许操作决定调度器是否应考虑调用它。 -若操作未启用, -`Actions` widget 会给 widget 层次结构中更高位置的另一个已启用操作(若存在)执行机会。 +若操作未启用,则不会被调用,且框架会在此处停止搜索匹配操作。 The previous example uses a `Builder` because `Actions.handler` and `Actions.invoke` (for example) only finds actions in the provided `context`, and diff --git a/sites/docs/src/data/banner.yml b/sites/docs/src/data/banner.yml index ca0a0df34e..a19aefde30 100644 --- a/sites/docs/src/data/banner.yml +++ b/sites/docs/src/data/banner.yml @@ -7,10 +7,11 @@ - text: "Flutter 3.44 正式发布!了解 " - link: text: "新特性" - url: https://www.youtube.com/watch?v=I1uIbGh1dGE&t=1s + url: https://www.youtube.com/watch?v=I1uIbGh1dGE newTab: true - text: " 以及阅读 " - link: text: "博客文章" url: https://blog.flutter.dev/whats-new-in-flutter-3-44-b0cc1ad3c527 newTab: true +- text: "。" diff --git a/sites/www/content/banner.yaml b/sites/www/content/banner.yaml index a7b034ba95..03620a2911 100644 --- a/sites/www/content/banner.yaml +++ b/sites/www/content/banner.yaml @@ -1,3 +1,4 @@ text: >- - Help improve Flutter! Take our Q2 survey -link: https://google.qualtrics.com/jfe/form/SV_3drKjSfjNeLZfq6?Source=Website + Flutter 3.44 is here! Everywhere, everyday, built by everyone, for everyone. + Learn more +link: https://blog.flutter.dev/whats-new-in-flutter-3-44-b0cc1ad3c527 diff --git a/sites/www/content/consultants/data/partners.yaml b/sites/www/content/consultants/data/partners.yaml index c6e87073fa..e5c0999422 100644 --- a/sites/www/content/consultants/data/partners.yaml +++ b/sites/www/content/consultants/data/partners.yaml @@ -460,6 +460,18 @@ options_customer_size: - "Startup" options_GCP_partner: false +- title: "SolGuruz LLP" + summary: "Is a full-stack development agency for web and mobile applications, dedicated to delivering top-tier, customized software solutions that align with their clients' unique goals. SolGuruz is driven by a true passion for craft and aims to surpass expectations across every project." + card: "images/third_party/partners/SolGoruz.png" + external_url: "https://solguruz.com/services/flutter-app-development/" + options_location: + - "Asia" + - "Europe" + - "North America" + - "South America" + options_customer_size: + - "Small-to-medium Business" + options_GCP_partner: false - title: "Paulonia" summary: "We are a human team with skills in design and development of cross-platform apps in Flutter with the vision of being a technological reference in Latin America." card: "images/third_party/partners/Paulonia.png" @@ -1167,4 +1179,20 @@ - "Startup" - "Small-to-medium Business" - "Enterprise" + options_GCP_partner: false +- title: "Perpetio" + summary: "Is a boutique European agency that designs AI-first applications, from MVP to scalable products used by millions." + card: "images/third_party/partners/Perpetio_logo.png" + external_url: "https://perpet.io/services/flutter" + options_location: + - "Africa" + - "Asia" + - "Europe" + - "North America" + - "Oceania" + - "South America" + options_customer_size: + - "Startup" + - "Small-to-medium Business" + - "Enterprise" options_GCP_partner: false \ No newline at end of file diff --git a/sites/www/content/consultants/images/third_party/partners/Perpetio_logo.png b/sites/www/content/consultants/images/third_party/partners/Perpetio_logo.png new file mode 100644 index 0000000000..341513f714 Binary files /dev/null and b/sites/www/content/consultants/images/third_party/partners/Perpetio_logo.png differ diff --git a/sites/www/content/images/third_party/case_studies/karaca/logo.png b/sites/www/content/images/third_party/case_studies/karaca/logo.png new file mode 100644 index 0000000000..87e6a4df21 Binary files /dev/null and b/sites/www/content/images/third_party/case_studies/karaca/logo.png differ diff --git a/sites/www/content/images/third_party/case_studies/toyota/logo.png b/sites/www/content/images/third_party/case_studies/toyota/logo.png new file mode 100644 index 0000000000..5aca713d65 Binary files /dev/null and b/sites/www/content/images/third_party/case_studies/toyota/logo.png differ diff --git a/sites/www/content/images/third_party/logos/karaca.png b/sites/www/content/images/third_party/logos/karaca.png index e80c93553a..87e6a4df21 100644 Binary files a/sites/www/content/images/third_party/logos/karaca.png and b/sites/www/content/images/third_party/logos/karaca.png differ diff --git a/sites/www/content/images/third_party/logos/kqed.png b/sites/www/content/images/third_party/logos/kqed.png new file mode 100644 index 0000000000..6041048123 Binary files /dev/null and b/sites/www/content/images/third_party/logos/kqed.png differ diff --git a/sites/www/content/images/third_party/logos/sofi.svg b/sites/www/content/images/third_party/logos/sofi.svg new file mode 100644 index 0000000000..c70bbe049b --- /dev/null +++ b/sites/www/content/images/third_party/logos/sofi.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sites/www/content/images/third_party/logos/toyota.png b/sites/www/content/images/third_party/logos/toyota.png index 09be550978..5aca713d65 100644 Binary files a/sites/www/content/images/third_party/logos/toyota.png and b/sites/www/content/images/third_party/logos/toyota.png differ diff --git a/sites/www/content/images/third_party/logos/toyota.svg b/sites/www/content/images/third_party/logos/toyota.svg deleted file mode 100644 index 00baadb50a..0000000000 --- a/sites/www/content/images/third_party/logos/toyota.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sites/www/content/images/third_party/logos/zoho.png b/sites/www/content/images/third_party/logos/zoho.png new file mode 100644 index 0000000000..4cc2de3eff Binary files /dev/null and b/sites/www/content/images/third_party/logos/zoho.png differ diff --git a/sites/www/content/showcase/data/companies.yaml b/sites/www/content/showcase/data/companies.yaml index 5a9ca531b6..80c5dffbfb 100644 --- a/sites/www/content/showcase/data/companies.yaml +++ b/sites/www/content/showcase/data/companies.yaml @@ -16,9 +16,6 @@ - name: Betterment logo: /images/third_party/logos/betterment.svg -- name: Bytedance - logo: /images/third_party/logos/bytedance.svg - - name: CrowdSource logo: /images/third_party/logos/crowdsource.svg @@ -49,6 +46,9 @@ - name: Karaca logo: /images/third_party/logos/karaca.png +- name: KQED + logo: /images/third_party/logos/kqed.png + - name: Lotum logo: /images/third_party/logos/lotum.svg @@ -85,5 +85,11 @@ - name: Toyota logo: /images/third_party/logos/toyota.png +- name: SoFi + logo: /images/third_party/logos/sofi.svg + - name: Ubuntu logo: /images/third_party/logos/ubuntu.svg + +- name: Zoho + logo: /images/third_party/logos/zoho.png diff --git a/sites/www/content/showcase/images/third_party/case_studies/kqed/1.png b/sites/www/content/showcase/images/third_party/case_studies/kqed/1.png new file mode 100644 index 0000000000..60cf82893e Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/kqed/1.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/kqed/3.png b/sites/www/content/showcase/images/third_party/case_studies/kqed/3.png new file mode 100644 index 0000000000..8ad135bd23 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/kqed/3.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/kqed/4.png b/sites/www/content/showcase/images/third_party/case_studies/kqed/4.png new file mode 100644 index 0000000000..59fc07bd21 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/kqed/4.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/kqed/kqed.png b/sites/www/content/showcase/images/third_party/case_studies/kqed/kqed.png new file mode 100644 index 0000000000..6041048123 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/kqed/kqed.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00154v2.png b/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00154v2.png new file mode 100644 index 0000000000..4dd0febb5b Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00154v2.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00242v2.png b/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00242v2.png new file mode 100644 index 0000000000..de05a75004 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/sofi/Phone01_00242v2.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/sofi/sofi.svg b/sites/www/content/showcase/images/third_party/case_studies/sofi/sofi.svg new file mode 100644 index 0000000000..c70bbe049b --- /dev/null +++ b/sites/www/content/showcase/images/third_party/case_studies/sofi/sofi.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/Android.png b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/Android.png new file mode 100644 index 0000000000..46472d8dd7 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/Android.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/iPhone.png b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/iPhone.png new file mode 100644 index 0000000000..217dec7090 Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/iPhone.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/tablet_and_ipad.png b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/tablet_and_ipad.png new file mode 100644 index 0000000000..748c4bdf9c Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/tablet_and_ipad.png differ diff --git a/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/zoho.png b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/zoho.png new file mode 100644 index 0000000000..4cc2de3eff Binary files /dev/null and b/sites/www/content/showcase/images/third_party/case_studies/zoho-tables/zoho.png differ diff --git a/sites/www/content/showcase/karaca.md b/sites/www/content/showcase/karaca.md index 746ad56f25..98147fd1f4 100644 --- a/sites/www/content/showcase/karaca.md +++ b/sites/www/content/showcase/karaca.md @@ -6,7 +6,7 @@ summary: Karaca ships features twice as fast to over a million monthly users wit appName: Karaca companyName: Karaca logo: images/third_party/case_studies/karaca/logo.png -card: images/third_party/case_studies/karaca/case_study_card.png +card: images/third_party/case_studies/karaca/logo.png videoEmbedUrl: "https://www.youtube.com/embed/N8I-fdOYWnc" locations: - Europe @@ -19,7 +19,7 @@ tags: - mobile - android - ios -publishDate: 2026-06-08 +publishDate: 2026-04-24 successMetrics: - text: 2x desc: faster shipping of new features diff --git a/sites/www/content/showcase/kqed.md b/sites/www/content/showcase/kqed.md new file mode 100644 index 0000000000..e31d3cfdc0 --- /dev/null +++ b/sites/www/content/showcase/kqed.md @@ -0,0 +1,85 @@ +--- +title: KQED +description: Learn how Bay Area public media station KQED used Flutter to rebuild their 4.8 star rated mobile app, reducing codebase size by 70%, and building a unified CarPlay and Android Auto audio experience. +headline: KQED +summary: KQED transitions to Flutter, raising app store ratings to 4.8 stars and increasing feature cadence by 55% +appName: KQED +companyName: KQED +logo: images/third_party/case_studies/kqed/kqed.png +card: images/third_party/case_studies/kqed/kqed.png +locations: + - North America +platforms: + - Mobile + - Web +industries: + - Media and Entertainment +tags: + - mobile + - android + - ios + - web +publishDate: 2026-06-24 +successMetrics: + - text: 4.8 + desc: App Store & Google Play rating + - text: 60% + desc: increase in developer productivity + - text: 70% + desc: reduction in overall codebase size +--- + +KQED homepage + +[KQED](https://www.kqed.org/?utm_source=flutter_blog&utm_medium=referral&utm_campaign=flutter_showcase_2026&utm_content=kqed_org_link) is Northern California’s public media source for trustworthy news, local stories, NPR & PBS programs, podcasts, live radio, and community events. Serving the San Francisco Bay Area across on-air broadcast, the web, and mobile, KQED is powered by its members to inform, inspire, and connect the community. + +KQED needed to modernize its mobile experience. +Initially, the team sought to quickly launch an updated app +to meet the needs of users and internal stakeholders. +Today, the goal is to make it easy for Bay Area audiences +to access trusted local news, live radio, podcasts, and video in one place, +while building daily habits and strengthening membership support. + +**Why Flutter?** + +As a nonprofit organization, KQED has limited resources. The team did not have large platform-specific groups or the ability to maintain separate iOS and Android codebases long term. "Writing and maintaining a single codebase allows us to reach more users with less time spent on platform specifics," the team noted. + +Before adopting Flutter, KQED reevaluated their options after experiencing common issues with other solutions. Rather than jumping straight into a full rebuild, the team started by defining their constraints. They needed to support reliable live audio streaming with a small development capacity. + +To mitigate risk, they built a lightweight proof-of-concept focused on a content feed, navigation, and background audio playback. Once they confirmed that Flutter met their performance standards and supported stable streaming, they committed to the rewrite. + +**Their solution** + +Working with their strategic technology partner [Uptech Studio](https://www.uptechstudio.com/?utm_source=other&utm_medium=other&utm_campaign=flutterdev&utm_content=textlink-inline), KQED rebuilt their mobile application from the ground up in just three months. Flutter’s Hot Reload and Hot Restart features proved to be a developer favorite, making it easy and fun to iterate on UI/design tweaks. + +KQED news view + +A key highlight of the solution is the KQED CarPlay and Android Auto integration, which brings live radio, podcast episodes, and show browsing to the dashboard screen. The team developed the following capabilities to serve their users: + +* **CarPlay:** The team forked the `flutter_carplay` plugin to extend it, using Apple's template-based UI system driven by Riverpod providers. +* **Android Auto:** The team leveraged the `audio_service` package, which implements the native Java `MediaBrowserServiceCompat` and handles playback callbacks. + +All core business logic, including podcast fetching, playback state, and analytics, lives entirely in shared Dart code. The native car layers act as thin shells that translate platform requests into calls on the existing Flutter audio infrastructure. + +KQED radio view + +With technical debt reduced, KQED is focusing on innovation. Their immediate roadmap includes the rollout of a daily Bay Area news word search game, [*Foggy Find*](https://www.kqed.org/games/foggy-find/?utm_source=flutter_blog&utm_medium=referral&utm_campaign=flutter_showcase_2026&utm_content=foggy_find_link). The team is using *Foggy Find* as a strategic launchpad to experiment with Flutter web and casual games. + +By compiling the game directly for the web, they can test user engagement, drive browser-based acquisition, and iterate quickly outside of app store review cycles. + +**Results** + +The migration to Flutter has been transformative for both users and the engineering team: + +* **Ratings surge:** User ratings on the App Store and Google Play jumped from a struggling 2.0 stars to a 4.8-star average. +* **Developer efficiency:** Moving to a single codebase improved internal developer productivity by 60%. +* **Codebase reduction:** Writing and maintaining logic once resulted in a 70% decrease in overall codebase size. +* **Velocity boost:** Feature release cadence increased by 55%, + with a 13x increase in the number of features offered. + +
+ +***"Ultimately, Flutter didn't just change our codebase; it fundamentally changed how fast we can deliver value to our users."*** + +
+
diff --git a/sites/www/content/showcase/sofi.md b/sites/www/content/showcase/sofi.md new file mode 100644 index 0000000000..7624e9feab --- /dev/null +++ b/sites/www/content/showcase/sofi.md @@ -0,0 +1,86 @@ +--- +title: "SoFi" +description: + "SoFi delivers a unified, high-quality financial experience across mobile + platforms using Flutter, streamlining development and reducing code by 60%." +headline: "SoFi" +summary: "Delivering a finance superapp experience with Flutter" +appName: "SoFi" +companyName: "SoFi" +logo: "images/third_party/case_studies/sofi/sofi.svg" +card: "images/third_party/case_studies/sofi/sofi.svg" +videoEmbedUrl: "https://www.youtube.com/embed/RBObC8T7ud0" +locations: + - North America +platforms: + - Mobile +industries: + - Banking & Finance +successMetrics: + - text: 15 + desc: "million users served" + - perc: 60 + desc: "reduction in lines of code" +tags: + - mobile + - android + - ios +publishDate: 2026-06-29 +--- + +[SoFi](https://www.sofi.com/) is a leading financial technology company that +offers an all-in-one super app for its nearly 15 million members. From banking +and investing to lending products and financial insights, the digital experience +is critical to SoFi’s members, who rely on the app for time-sensitive tasks like +placing trades or making payments on time. Because reliability and security are +paramount, SoFi needed an efficient mobile development platform to deliver a +high-quality experience without doubling their engineering efforts. + +Previously, SoFi maintained separate native iOS and Android applications. This +native-only approach meant they had to build everything twice, which led to +inconsistencies in the user interface and doubled the time needed for +implementation. From managing separate A/B testing pipelines to coordinating +distinct user research cycles, the development process overhead became +unsustainable. + +**Why Flutter?** + +SoFi's early explorations showed that Flutter offers both a better developer +experience and a superior user experience. As they evaluated the technology, the +team appreciated Flutter's flexibility, which enabled developers to work in fine +detail on custom animations and motion effects. With a promising initial proof +of concept, SoFi gradually increased its investment in Flutter to unify its +mobile development under a single, high-performing codebase. + +**Their solution: Building with Flutter** + +To ensure stability and security during the migration, the team chose an +in-place rewrite strategy (often referred to as +[Add-to-app](https://docs.flutter.dev/add-to-app)). They integrated a standalone +Flutter module into their existing native context, letting them rewrite features +one by one. As features were built in Flutter, the team deployed them behind +feature flags, allowing them to gradually shut down the old native +implementations. + +To maximize velocity, SoFi leveraged a package-based architecture with example +apps. This setup made it possible for individual teams to develop and test +features locally inside independent packages, significantly reducing developer +iteration times. It also optimized their CI pipeline by letting them target +builds, run tests, and execute screenshot tests only on the packages that had +changed. With developers freed from constantly debugging crashes, SoFi's mobile +core team transitioned to building advanced tools and internal systems that make +the entire engineering organization more effective. + +**Key results and business impact** + +By adopting Flutter, SoFi transformed its mobile development workflow and +achieved significant business and technical wins: + +- Achieved a 60% reduction in lines of code on a feature-per-feature, + apples-to-apples comparison. +- Deleted over one million lines of code overall during the migration. +- Slashed the time required for code reviews, local builds, and iteration + cycles. + +
+
diff --git a/sites/www/content/showcase/stage.md b/sites/www/content/showcase/stage.md index 95100f1a2b..fdfca7c993 100644 --- a/sites/www/content/showcase/stage.md +++ b/sites/www/content/showcase/stage.md @@ -14,7 +14,7 @@ platforms: - Mobile - Desktop industries: - - Travel & Lifestyle + - Media and Entertainment successMetrics: - perc: 50 desc: increase in developer efficiency diff --git a/sites/www/content/showcase/sua-musica.md b/sites/www/content/showcase/sua-musica.md index c3661a4cb5..2bbc671072 100644 --- a/sites/www/content/showcase/sua-musica.md +++ b/sites/www/content/showcase/sua-musica.md @@ -12,7 +12,7 @@ locations: platforms: - Mobile industries: - - Travel & Lifestyle + - Media and Entertainment successMetrics: - perc: 350 desc: increase in impressions diff --git a/sites/www/content/showcase/tencent.md b/sites/www/content/showcase/tencent.md index 39c83ef82d..cd857098bf 100644 --- a/sites/www/content/showcase/tencent.md +++ b/sites/www/content/showcase/tencent.md @@ -12,7 +12,7 @@ locations: platforms: - Mobile industries: - - Productivity + - Media and Entertainment successMetrics: - perc: 80 desc: increased debugging efficiency diff --git a/sites/www/content/showcase/toyota.md b/sites/www/content/showcase/toyota.md index 6f39aa1b28..48bb4e366a 100644 --- a/sites/www/content/showcase/toyota.md +++ b/sites/www/content/showcase/toyota.md @@ -16,7 +16,7 @@ industries: - Travel & Lifestyle tags: - embedded -publishDate: 2026-08-06 +publishDate: 2026-05-20 --- Toyota, one of the world's leading automotive manufacturers, diff --git a/sites/www/content/showcase/zoho-tables.md b/sites/www/content/showcase/zoho-tables.md new file mode 100644 index 0000000000..26d80ced76 --- /dev/null +++ b/sites/www/content/showcase/zoho-tables.md @@ -0,0 +1,103 @@ +--- +title: "Zoho Tables" +description: "Learn how the Zoho Tables team built their multi-platform spreadsheet-database hybrid using Flutter, achieving feature parity in 14% less time with a 60% smaller team." +headline: "Zoho Tables" +summary: "Building a spreadsheet-database hybrid with Flutter" +appName: "Zoho Tables" +companyName: "Zoho" +logo: "images/third_party/case_studies/zoho-tables/zoho.png" +card: "images/third_party/case_studies/zoho-tables/zoho.png" +videoEmbedUrl: "https://www.youtube.com/embed/YWAuwAR28KY" +locations: + - India +platforms: + - Mobile +industries: + - Productivity +successMetrics: + - perc: 60 + desc: "smaller team size" + - perc: 50 + desc: "reduction in developer costs" + - perc: 42 + desc: "higher refresh rates" +tags: + - mobile + - android + - ios +publishDate: "2026-05-01" +--- + +[Zoho](http://www.zoho.com) serves over 130 million users +across 180 countries across a catalog of 55 applications. +The duplication of efforts across Android, iPhone, and iPad platforms +presented a massive drain on engineering resources. +To address this challenge, the team adopted Flutter +to build [Zoho Tables](https://www.zoho.com/tables/) +with a fraction of their engineering resources. + +iPhone and iPad + +**Why Flutter?** + +Before committing to a technology, +the Zoho Tables team built rigorous proofs of concept, +ran widget tests, and benchmarked refresh rates +for different cross-platform technologies. +Flutter consistently outperformed the competition, +demonstrating a 42% higher refresh rate. +This high performance was essential +for the application's "infinite canvas," +which hosts massive spreadsheets, galleries, and calendars. + +Android + +Additionally, Flutter's comprehensive documentation +enabled their existing Java and Swift developers +to transition to Dart almost immediately, +making it possible to build functional user interface components +in no time. +Flutter also enabled the team to respect platform-specific +design conventions using Material and Cupertino libraries +while maintaining a single codebase. + +**Their solution: Building with Flutter** + +The team built the Zoho Tables mobile application +by rendering content on a custom canvas +using Flutter's custom paint and scroll physics. +This custom implementation achieved smooth scrolling +for users interacting with anywhere from 100 to 100,000 rows of data. + +iPhone + +To integrate native hardware features, +the team combined Flutter's platform channels with native APIs. +This approach brought support for Apple Pencil and Samsung S Pen, +allowing users to sketch, take notes, +and even create a new database by drawing a form. +For state management, the team used a combination of +[BLoC](https://pub.dev/packages/bloc), `ValueNotifier`, +and `ValueListenableBuilder` to organize a codebase +of over one million lines of code. +The team is also experimenting with using Flutter's GenUI SDK +to let users build rich dashboards with AI +and integrate Zoho Tables with AI agents with Gemini. + +**Key results and business impact** + +By adopting Flutter, the Zoho Tables team +achieved significant development velocity and cost reductions: + +* Reached feature parity with their web application + in 14% less time. +* Shipped on mobile with a team that was 60% smaller + than the web application team. +* Reduced overall developer costs by 50%. +* Decreased build times by 70% using hot reload + and fast compilation. +* Achieved a 42% higher refresh rate + compared to other cross-platform options. + +
+
\ No newline at end of file diff --git a/sites/www/lib/src/components/common/image.dart b/sites/www/lib/src/components/common/image.dart index da76fdff8a..45a81abcd1 100644 --- a/sites/www/lib/src/components/common/image.dart +++ b/sites/www/lib/src/components/common/image.dart @@ -33,7 +33,7 @@ class Image extends StatelessComponent { @override Component build(BuildContext context) { return img( - src: context.asset(src, width: 800), + src: context.asset(src, width: 1200), classes: [ 'richtext-image', if (fullWidth) 'full-width', diff --git a/sites/www/lib/src/components/pages/showcase_grid.dart b/sites/www/lib/src/components/pages/showcase_grid.dart index e727e2345a..8a32eb3c25 100644 --- a/sites/www/lib/src/components/pages/showcase_grid.dart +++ b/sites/www/lib/src/components/pages/showcase_grid.dart @@ -30,20 +30,21 @@ class ShowcaseGrid extends StatelessComponent { ]), FilterType('industries', 'Industry', [ 'Banking & Finance', - 'Health', + 'Education', 'Games', - 'Travel & Lifestyle', + 'Health', + 'Media and Entertainment', 'Productivity', - 'Education', 'Social', + 'Travel & Lifestyle', ]), FilterType('locations', 'Location', [ - 'Asia', 'Africa', - 'North America', - 'South America', + 'Asia', 'Europe', + 'North America', 'Oceania', + 'South America', ]), ], ); diff --git a/sites/www/lib/src/pages/home_page.dart b/sites/www/lib/src/pages/home_page.dart index bfbadc562d..33d4e80515 100644 --- a/sites/www/lib/src/pages/home_page.dart +++ b/sites/www/lib/src/pages/home_page.dart @@ -424,8 +424,8 @@ class HomePage extends StatelessComponent { ]), div([ img( - src: context.asset('images/third_party/logos/bytedance.svg'), - alt: 'Byte Dance', + src: context.asset('images/third_party/logos/emaar.svg'), + alt: 'Emaar', ), ]), ]), @@ -452,8 +452,8 @@ class HomePage extends StatelessComponent { div(classes: 'logo-col', [ div([ img( - src: context.asset('images/third_party/logos/emaar.svg'), - alt: 'Emaar', + src: context.asset('images/third_party/logos/sofi.svg'), + alt: 'SoFi', ), ]), div([ @@ -480,7 +480,7 @@ class HomePage extends StatelessComponent { ]), div([ img( - src: context.asset('images/third_party/logos/toyota.svg'), + src: context.asset('images/third_party/logos/toyota.png'), alt: 'Toyota', ), ]), diff --git a/tool/dash_site/lib/src/commands/refresh_excerpts.dart b/tool/dash_site/lib/src/commands/refresh_excerpts.dart index 9f1558e0df..27aa2c971a 100644 --- a/tool/dash_site/lib/src/commands/refresh_excerpts.dart +++ b/tool/dash_site/lib/src/commands/refresh_excerpts.dart @@ -70,6 +70,8 @@ Future _refreshExcerpts({ // Workaround for https://github.com/dart-lang/dart_style/issues/1644 // to remove extra new lines after block close. SimpleReplaceTransform(RegExp(r'[\r\n]+$'), ''), + // Compress extra empty lines, working around formatting oddities. + SimpleReplaceTransform(RegExp(r'\n{3,}'), '\n\n'), ], ); diff --git a/tool/dash_site/lib/src/commands/stage_preview.dart b/tool/dash_site/lib/src/commands/stage_preview.dart index 0e7f8a124d..97eb73e12b 100644 --- a/tool/dash_site/lib/src/commands/stage_preview.dart +++ b/tool/dash_site/lib/src/commands/stage_preview.dart @@ -201,18 +201,14 @@ Future _deploySiteToStaging( 'preview channel $channel...', ); - final result = await Process.run( - firebaseCliExecutable, - [ - 'hosting:channel:deploy', - channel, - '--project=$project', - '--expires', - expires, - '--json', - ], - workingDirectory: path.join(repositoryRoot, site.firebaseConfigDirectory), - ); + final result = await Process.run(firebaseCliExecutable, [ + 'hosting:channel:deploy', + channel, + '--project=$project', + '--expires', + expires, + '--json', + ], workingDirectory: path.join(repositoryRoot, site.firebaseConfigDirectory)); if (result.exitCode != 0) { stderr.writeln(result.stderr);