diff --git a/add_to_app/books/flutter_module_books/lib/main.dart b/add_to_app/books/flutter_module_books/lib/main.dart index 3ef7fa7b5..99da87c0a 100644 --- a/add_to_app/books/flutter_module_books/lib/main.dart +++ b/add_to_app/books/flutter_module_books/lib/main.dart @@ -66,8 +66,6 @@ class _BookDetailState extends State { // Registering this `FlutterBookApiHandler` class lets us receive incoming // calls from the platform. - // TODO(gaaclarke): make the setup method an instance method so it's - // injectable https://github.com/flutter/flutter/issues/59119. FlutterBookApi.setup( FlutterBookApiHandler( // The `FlutterBookApi` just has one method. Just give a closure for that @@ -82,7 +80,6 @@ class _BookDetailState extends State { this.book!.title = titleTextController.text; }); // Subtitle could be null. - // TODO(gaaclarke): https://github.com/flutter/flutter/issues/59118. subtitleTextController.text = book.subtitle ?? ''; subtitleTextController.addListener(() { this.book!.subtitle = subtitleTextController.text; diff --git a/cupertino_gallery/lib/gallery_home.dart b/cupertino_gallery/lib/gallery_home.dart index b5a407567..fc1b25f26 100644 --- a/cupertino_gallery/lib/gallery_home.dart +++ b/cupertino_gallery/lib/gallery_home.dart @@ -37,11 +37,11 @@ class GalleryHome extends StatelessWidget { return switch (index) { 0 => const WidgetsPage(), 1 => SettingsPage( - onThemeChange: onThemeChange, - isDarkMode: isDarkMode, - onTextSizeChange: onTextSizeChange, - textSize: textSize, - ), + onThemeChange: onThemeChange, + isDarkMode: isDarkMode, + onTextSizeChange: onTextSizeChange, + textSize: textSize, + ), _ => const Center(child: Text('Widgets')), }; }, diff --git a/cupertino_gallery/lib/main.dart b/cupertino_gallery/lib/main.dart index 934796db8..eed53bd73 100644 --- a/cupertino_gallery/lib/main.dart +++ b/cupertino_gallery/lib/main.dart @@ -37,24 +37,31 @@ class _CupertinoGalleryAppState extends State { @override Widget build(BuildContext context) { final baseTheme = CupertinoThemeData( - brightness: - _themeMode == ThemeMode.dark ? Brightness.dark : Brightness.light, + brightness: _themeMode == ThemeMode.dark + ? Brightness.dark + : Brightness.light, ); final textTheme = baseTheme.textTheme.copyWith( - textStyle: - baseTheme.textTheme.textStyle.copyWith(fontSize: 14 * _textSize), - actionTextStyle: baseTheme.textTheme.actionTextStyle - .copyWith(fontSize: 14 * _textSize), - tabLabelTextStyle: baseTheme.textTheme.tabLabelTextStyle - .copyWith(fontSize: 10 * _textSize), - navTitleTextStyle: baseTheme.textTheme.navTitleTextStyle - .copyWith(fontSize: 17 * _textSize), + textStyle: baseTheme.textTheme.textStyle.copyWith( + fontSize: 14 * _textSize, + ), + actionTextStyle: baseTheme.textTheme.actionTextStyle.copyWith( + fontSize: 14 * _textSize, + ), + tabLabelTextStyle: baseTheme.textTheme.tabLabelTextStyle.copyWith( + fontSize: 10 * _textSize, + ), + navTitleTextStyle: baseTheme.textTheme.navTitleTextStyle.copyWith( + fontSize: 17 * _textSize, + ), navLargeTitleTextStyle: baseTheme.textTheme.navLargeTitleTextStyle .copyWith(fontSize: 34 * _textSize), - navActionTextStyle: baseTheme.textTheme.navActionTextStyle - .copyWith(fontSize: 17 * _textSize), - pickerTextStyle: baseTheme.textTheme.pickerTextStyle - .copyWith(fontSize: 21 * _textSize), + navActionTextStyle: baseTheme.textTheme.navActionTextStyle.copyWith( + fontSize: 17 * _textSize, + ), + pickerTextStyle: baseTheme.textTheme.pickerTextStyle.copyWith( + fontSize: 21 * _textSize, + ), dateTimePickerTextStyle: baseTheme.textTheme.dateTimePickerTextStyle .copyWith(fontSize: 21 * _textSize), ); diff --git a/cupertino_gallery/lib/settings_page.dart b/cupertino_gallery/lib/settings_page.dart index 59a4b3c73..ae35c4461 100644 --- a/cupertino_gallery/lib/settings_page.dart +++ b/cupertino_gallery/lib/settings_page.dart @@ -140,4 +140,3 @@ class _SettingsPageState extends State { ); } } - diff --git a/cupertino_gallery/lib/widgets/action_sheet_page.dart b/cupertino_gallery/lib/widgets/action_sheet_page.dart index 5949323cb..b5a8c5b0e 100644 --- a/cupertino_gallery/lib/widgets/action_sheet_page.dart +++ b/cupertino_gallery/lib/widgets/action_sheet_page.dart @@ -6,9 +6,7 @@ class ActionSheetPage extends StatelessWidget { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Action Sheet'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Action Sheet')), child: Center( child: CupertinoButton( child: const Text('Show Action Sheet'), @@ -30,7 +28,7 @@ class ActionSheetPage extends StatelessWidget { onPressed: () { Navigator.pop(context); }, - ) + ), ], cancelButton: CupertinoActionSheetAction( isDefaultAction: true, diff --git a/cupertino_gallery/lib/widgets/activity_indicator_page.dart b/cupertino_gallery/lib/widgets/activity_indicator_page.dart index 550da6f62..f02452fdb 100644 --- a/cupertino_gallery/lib/widgets/activity_indicator_page.dart +++ b/cupertino_gallery/lib/widgets/activity_indicator_page.dart @@ -6,12 +6,8 @@ class ActivityIndicatorPage extends StatelessWidget { @override Widget build(BuildContext context) { return const CupertinoPageScaffold( - navigationBar: CupertinoNavigationBar( - middle: Text('Activity Indicator'), - ), - child: Center( - child: CupertinoActivityIndicator(), - ), + navigationBar: CupertinoNavigationBar(middle: Text('Activity Indicator')), + child: Center(child: CupertinoActivityIndicator()), ); } } diff --git a/cupertino_gallery/lib/widgets/checkbox_page.dart b/cupertino_gallery/lib/widgets/checkbox_page.dart index 357cb0746..6244e6b87 100644 --- a/cupertino_gallery/lib/widgets/checkbox_page.dart +++ b/cupertino_gallery/lib/widgets/checkbox_page.dart @@ -13,9 +13,7 @@ class _CheckboxPageState extends State { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Checkbox'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Checkbox')), child: Center( child: CupertinoCheckbox( value: _value, diff --git a/cupertino_gallery/lib/widgets/date_picker_page.dart b/cupertino_gallery/lib/widgets/date_picker_page.dart index 26395a315..126bd967c 100644 --- a/cupertino_gallery/lib/widgets/date_picker_page.dart +++ b/cupertino_gallery/lib/widgets/date_picker_page.dart @@ -6,15 +6,11 @@ class DatePickerPage extends StatelessWidget { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Date Picker'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Date Picker')), child: Center( child: SizedBox( height: 200, - child: CupertinoDatePicker( - onDateTimeChanged: (DateTime newDate) {}, - ), + child: CupertinoDatePicker(onDateTimeChanged: (DateTime newDate) {}), ), ), ); diff --git a/cupertino_gallery/lib/widgets/picker_page.dart b/cupertino_gallery/lib/widgets/picker_page.dart index 21726435b..63223061d 100644 --- a/cupertino_gallery/lib/widgets/picker_page.dart +++ b/cupertino_gallery/lib/widgets/picker_page.dart @@ -6,20 +6,14 @@ class PickerPage extends StatelessWidget { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Picker'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Picker')), child: Center( child: SizedBox( height: 200, child: CupertinoPicker( itemExtent: 32, onSelectedItemChanged: (int index) {}, - children: const [ - Text('One'), - Text('Two'), - Text('Three'), - ], + children: const [Text('One'), Text('Two'), Text('Three')], ), ), ), diff --git a/cupertino_gallery/lib/widgets/search_text_field_page.dart b/cupertino_gallery/lib/widgets/search_text_field_page.dart index 00aefc65c..7a591ef05 100644 --- a/cupertino_gallery/lib/widgets/search_text_field_page.dart +++ b/cupertino_gallery/lib/widgets/search_text_field_page.dart @@ -6,9 +6,7 @@ class SearchTextFieldPage extends StatelessWidget { @override Widget build(BuildContext context) { return const CupertinoPageScaffold( - navigationBar: CupertinoNavigationBar( - middle: Text('Search Text Field'), - ), + navigationBar: CupertinoNavigationBar(middle: Text('Search Text Field')), child: Center( child: Padding( padding: EdgeInsets.all(16.0), diff --git a/cupertino_gallery/lib/widgets/slider_page.dart b/cupertino_gallery/lib/widgets/slider_page.dart index 61d812a43..38536b159 100644 --- a/cupertino_gallery/lib/widgets/slider_page.dart +++ b/cupertino_gallery/lib/widgets/slider_page.dart @@ -13,9 +13,7 @@ class _SliderPageState extends State { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Slider'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Slider')), child: Center( child: CupertinoSlider( value: _value, diff --git a/cupertino_gallery/lib/widgets/switch_page.dart b/cupertino_gallery/lib/widgets/switch_page.dart index 627ce29b1..d0ffb8c8b 100644 --- a/cupertino_gallery/lib/widgets/switch_page.dart +++ b/cupertino_gallery/lib/widgets/switch_page.dart @@ -13,9 +13,7 @@ class _SwitchPageState extends State { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Switch'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Switch')), child: Center( child: CupertinoSwitch( value: _value, diff --git a/cupertino_gallery/lib/widgets/text_field_page.dart b/cupertino_gallery/lib/widgets/text_field_page.dart index e8a8f27b1..5d40a8aad 100644 --- a/cupertino_gallery/lib/widgets/text_field_page.dart +++ b/cupertino_gallery/lib/widgets/text_field_page.dart @@ -6,15 +6,11 @@ class TextFieldPage extends StatelessWidget { @override Widget build(BuildContext context) { return const CupertinoPageScaffold( - navigationBar: CupertinoNavigationBar( - middle: Text('Text Field'), - ), + navigationBar: CupertinoNavigationBar(middle: Text('Text Field')), child: Center( child: Padding( padding: EdgeInsets.all(16.0), - child: CupertinoTextField( - placeholder: 'Enter text', - ), + child: CupertinoTextField(placeholder: 'Enter text'), ), ), ); diff --git a/cupertino_gallery/lib/widgets/text_theme_page.dart b/cupertino_gallery/lib/widgets/text_theme_page.dart index 9e360b86c..f26912e45 100644 --- a/cupertino_gallery/lib/widgets/text_theme_page.dart +++ b/cupertino_gallery/lib/widgets/text_theme_page.dart @@ -6,9 +6,7 @@ class TextThemePage extends StatelessWidget { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Text Theme'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Text Theme')), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -35,9 +33,9 @@ class TextThemePage extends StatelessWidget { const SizedBox(height: 16), Text( 'This is the nav large title text style', - style: CupertinoTheme.of(context) - .textTheme - .navLargeTitleTextStyle, + style: CupertinoTheme.of( + context, + ).textTheme.navLargeTitleTextStyle, ), const SizedBox(height: 16), Text( @@ -47,8 +45,9 @@ class TextThemePage extends StatelessWidget { const SizedBox(height: 16), Text( 'This is the date time picker text style', - style: - CupertinoTheme.of(context).textTheme.dateTimePickerTextStyle, + style: CupertinoTheme.of( + context, + ).textTheme.dateTimePickerTextStyle, ), ], ), diff --git a/cupertino_gallery/lib/widgets/time_picker_page.dart b/cupertino_gallery/lib/widgets/time_picker_page.dart index 64a9d28dc..0b69ee276 100644 --- a/cupertino_gallery/lib/widgets/time_picker_page.dart +++ b/cupertino_gallery/lib/widgets/time_picker_page.dart @@ -6,9 +6,7 @@ class TimePickerPage extends StatelessWidget { @override Widget build(BuildContext context) { return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Time Picker'), - ), + navigationBar: const CupertinoNavigationBar(middle: Text('Time Picker')), child: Center( child: SizedBox( height: 200, diff --git a/date_planner/lib/event_list.dart b/date_planner/lib/event_list.dart index 21155b580..1ecdeb1bc 100644 --- a/date_planner/lib/event_list.dart +++ b/date_planner/lib/event_list.dart @@ -62,9 +62,6 @@ class EventList extends StatelessWidget { ), children: [ for (Event e in events.sorted(p)) - // TODO: Support swipe action for deleting. - // Should probably use Dismissable? - // https://api.flutter.dev/flutter/widgets/Dismissible-class.html EventRow( event: e, onTap: () async { diff --git a/desktop_photo_search/fluent_ui/lib/main.dart b/desktop_photo_search/fluent_ui/lib/main.dart index b8c39f13d..9fcb26d28 100644 --- a/desktop_photo_search/fluent_ui/lib/main.dart +++ b/desktop_photo_search/fluent_ui/lib/main.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:fluent_ui/fluent_ui.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:logging/logging.dart'; import 'package:menubar/menubar.dart' as menubar; @@ -47,7 +46,6 @@ void main() { ); } - class UnsplashSearchApp extends StatelessWidget { const UnsplashSearchApp({super.key}); diff --git a/desktop_photo_search/fluent_ui/lib/src/widgets/split.dart b/desktop_photo_search/fluent_ui/lib/src/widgets/split.dart index a4890e3de..2296019c3 100644 --- a/desktop_photo_search/fluent_ui/lib/src/widgets/split.dart +++ b/desktop_photo_search/fluent_ui/lib/src/widgets/split.dart @@ -19,8 +19,6 @@ import 'package:flutter/material.dart'; /// /// The user can drag the widget with key [dividerKey] to change /// the space allocated between [firstChild] and [secondChild]. -// TODO(djshuckerow): introduce support for a minimum fraction a child -// is allowed. class Split extends StatefulWidget { /// Builds a split oriented along [axis]. const Split({ @@ -125,12 +123,6 @@ class _SplitState extends State { }); } - // TODO(https://github.com/flutter/flutter/issues/43747): use an icon. - // The material icon for a drag handle is not currently available. - // For now, draw an indicator that is 3 lines running in the direction - // of the main axis, like a hamburger menu. - // TODO(https://github.com/flutter/devtools/issues/1265): update mouse - // to indicate that this is resizable. final dragIndicator = Flex( direction: isHorizontal ? Axis.vertical : Axis.horizontal, mainAxisSize: MainAxisSize.min, diff --git a/desktop_photo_search/fluent_ui/lib/unsplash_access_key.dart b/desktop_photo_search/fluent_ui/lib/unsplash_access_key.dart index b78324753..9f29f4673 100644 --- a/desktop_photo_search/fluent_ui/lib/unsplash_access_key.dart +++ b/desktop_photo_search/fluent_ui/lib/unsplash_access_key.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO: Retrieve an API Access Key from https://unsplash.com/developers +// To use this sample: Retrieve an API Access Key from https://unsplash.com/developers const String unsplashAccessKey = ''; // The application name for the above API Access Key. diff --git a/desktop_photo_search/material/lib/src/widgets/split.dart b/desktop_photo_search/material/lib/src/widgets/split.dart index a4890e3de..2296019c3 100644 --- a/desktop_photo_search/material/lib/src/widgets/split.dart +++ b/desktop_photo_search/material/lib/src/widgets/split.dart @@ -19,8 +19,6 @@ import 'package:flutter/material.dart'; /// /// The user can drag the widget with key [dividerKey] to change /// the space allocated between [firstChild] and [secondChild]. -// TODO(djshuckerow): introduce support for a minimum fraction a child -// is allowed. class Split extends StatefulWidget { /// Builds a split oriented along [axis]. const Split({ @@ -125,12 +123,6 @@ class _SplitState extends State { }); } - // TODO(https://github.com/flutter/flutter/issues/43747): use an icon. - // The material icon for a drag handle is not currently available. - // For now, draw an indicator that is 3 lines running in the direction - // of the main axis, like a hamburger menu. - // TODO(https://github.com/flutter/devtools/issues/1265): update mouse - // to indicate that this is resizable. final dragIndicator = Flex( direction: isHorizontal ? Axis.vertical : Axis.horizontal, mainAxisSize: MainAxisSize.min, diff --git a/desktop_photo_search/material/lib/unsplash_access_key.dart b/desktop_photo_search/material/lib/unsplash_access_key.dart index b78324753..9f29f4673 100644 --- a/desktop_photo_search/material/lib/unsplash_access_key.dart +++ b/desktop_photo_search/material/lib/unsplash_access_key.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO: Retrieve an API Access Key from https://unsplash.com/developers +// To use this sample: Retrieve an API Access Key from https://unsplash.com/developers const String unsplashAccessKey = ''; // The application name for the above API Access Key. diff --git a/form_app/lib/main.dart b/form_app/lib/main.dart index 5733d16e1..5b1ab62a3 100644 --- a/form_app/lib/main.dart +++ b/form_app/lib/main.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:io' show Platform; - -import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; @@ -19,7 +16,6 @@ void main() { runApp(const FormApp()); } - final demos = [ Demo( name: 'Sign in with HTTP', diff --git a/material_3_demo/lib/src/component_screen.dart b/material_3_demo/lib/src/component_screen.dart index 78f0b7772..6026f10c5 100644 --- a/material_3_demo/lib/src/component_screen.dart +++ b/material_3_demo/lib/src/component_screen.dart @@ -251,8 +251,6 @@ class Containment extends StatelessWidget { Carousels(), Dialogs(), Dividers(), - // TODO: Add Lists, https://github.com/flutter/flutter/issues/114006 - // TODO: Add Side sheets, https://github.com/flutter/flutter/issues/119328 ], ); } @@ -878,7 +876,6 @@ class _SwitchRowState extends State { return Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - // TODO: use SwitchListTile when thumbIcon is available https://github.com/flutter/flutter/issues/118616 Switch( value: value0, onChanged: widget.isEnabled @@ -948,7 +945,6 @@ class _CheckboxesState extends State { tristate: true, value: isChecked2, title: const Text('Option 3'), - // TODO: showcase error state https://github.com/flutter/flutter/issues/118616 onChanged: (value) { setState(() { isChecked2 = value; @@ -1703,7 +1699,6 @@ class _BottomSheetSectionState extends State { showModalBottomSheet( showDragHandle: true, context: context, - // TODO: Remove when this is in the framework https://github.com/flutter/flutter/issues/118619 constraints: const BoxConstraints(maxWidth: 640), builder: (context) { return SizedBox( @@ -1746,7 +1741,6 @@ class _BottomSheetSectionState extends State { _nonModalBottomSheetController = showBottomSheet( elevation: 8.0, context: context, - // TODO: Remove when this is in the framework https://github.com/flutter/flutter/issues/118619 constraints: const BoxConstraints(maxWidth: 640), builder: (context) { return SizedBox( @@ -2132,7 +2126,6 @@ class _TabsState extends State with TickerProviderStateMixin { ), ], ), - // TODO: Showcase secondary tab bar https://github.com/flutter/flutter/issues/111962 ), ), ), diff --git a/navigation_and_routing/lib/main.dart b/navigation_and_routing/lib/main.dart index 1b0ec26b3..2ce6440ce 100644 --- a/navigation_and_routing/lib/main.dart +++ b/navigation_and_routing/lib/main.dart @@ -1,10 +1,6 @@ // Copyright 2021, the Flutter project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - -import 'dart:io' show Platform; - -import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'src/app.dart'; @@ -16,4 +12,3 @@ void main() { const double windowWidth = 480; const double windowHeight = 854; - diff --git a/navigation_and_routing/lib/src/app.dart b/navigation_and_routing/lib/src/app.dart index 562ef89d2..884b10a2d 100644 --- a/navigation_and_routing/lib/src/app.dart +++ b/navigation_and_routing/lib/src/app.dart @@ -73,8 +73,6 @@ class _BookstoreState extends State { pageBuilder: (context, state, child) { return FadeTransitionPage( key: state.pageKey, - // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands child: Builder( builder: (context) { return BooksScreen( @@ -103,8 +101,6 @@ class _BookstoreState extends State { path: '/books/popular', pageBuilder: (context, state) { return FadeTransitionPage( - // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands key: state.pageKey, child: Builder( builder: (context) { @@ -139,8 +135,6 @@ class _BookstoreState extends State { pageBuilder: (context, state) { return FadeTransitionPage( key: state.pageKey, - // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands child: Builder( builder: (context) { return BookList( @@ -174,8 +168,6 @@ class _BookstoreState extends State { pageBuilder: (context, state) { return FadeTransitionPage( key: state.pageKey, - // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands child: Builder( builder: (context) { return BookList( @@ -234,7 +226,6 @@ class _BookstoreState extends State { int.parse(state.pathParameters['authorId']!), ); // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands return Builder( builder: (context) { return AuthorDetailsScreen( @@ -266,7 +257,6 @@ class _BookstoreState extends State { path: '/sign-in', builder: (context, state) { // Use a builder to get the correct BuildContext - // TODO (johnpryan): remove when https://github.com/flutter/flutter/issues/108177 lands return Builder( builder: (context) { return SignInScreen(