- 29 Aug, 2023 3 commits
-
-
Polina Cherkasova authored
-
Taha Tesser authored
fixes [Additional color mappings for FAB in Material 3](https://github.com/flutter/flutter/issues/130702) ### Preview 
-
Dan Field authored
The `ui.Display` is a simple data class (like `MediaQueryData`), and does not get updated when the display size changes. The provided sample code does not work as intended, but the update does.
-
- 28 Aug, 2023 13 commits
-
-
Polina Cherkasova authored
-
Polina Cherkasova authored
-
Zachary Anderson authored
…inding.instantiateImageCodec` (#132679)" This reverts commit b4f4ece4. Trial revert for https://github.com/flutter/flutter/issues/133398Co-authored-by:
LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
-
Renzo Olivares authored
Fixes #133027 When setting a `textButtonTheme` it should not override the native context menu colors. ```dart theme: ThemeData( textButtonTheme: const TextButtonThemeData( style: ButtonStyle( backgroundColor: MaterialStatePropertyAll<Color>( Color(0xff05164d)), // blue color ), ), ), ``` Before|After --|-- <img width="341" alt="Screenshot 2023-08-24 at 1 17 25 PM" src="https://github.com/flutter/flutter/assets/948037/30ea0ef8-b41a-4e1f-93a3-50fcd87ab2bf">|<img width="341" alt="Screenshot 2023-08-24 at 1 15 35 PM" src="https://github.com/flutter/flutter/assets/948037/5f59481c-aa5d-4850-aa4b-daa678e54044">
-
Taha Tesser authored
Fix `DatePickerDialog` & `DateRangePickerDialog` overflow when resized from landscape to portrait (#133327) fixes [resize window with a `showDateRangePicker` will make RenderFlex overflowed error](https://github.com/flutter/flutter/issues/131989) ### Description - This fixes `DatePickerDialog` & `DateRangePickerDialog` overflow error when resized from landscape to portrait. - Added tests that check these two widgets from landscape to portrait for no overflow errors. <details <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, home: Example(), ); } } class Example extends StatefulWidget { const Example({super.key}); @override State<Example> createState() => _ExampleState(); } class _ExampleState extends State<Example> { bool _portait = false; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('DatePicker & DateRangePicker'), ), body: MediaQuery( data: MediaQuery.of(context).copyWith( size: _portait ? const Size(400, 800) : const Size(800, 400), ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ DatePickerDialog( initialDate: DateTime.now(), firstDate: DateTime(2020), lastDate: DateTime(2030), initialEntryMode: DatePickerEntryMode.inputOnly, ), DateRangePickerDialog( currentDate: DateTime.now(), firstDate: DateTime(2020), lastDate: DateTime(2030), initialEntryMode: DatePickerEntryMode.inputOnly, ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: () { setState(() { _portait = !_portait; }); }, child: const Icon(Icons.refresh), ), ); } } ``` </details> ### Before https://github.com/flutter/flutter/assets/48603081/81387cbb-cdcf-42bd-b4f8-b7a08317c955 ### After https://github.com/flutter/flutter/assets/48603081/36d28ea9-cfed-48ad-90f5-0459755e08c0
-
Victoria Ashworth authored
Reverts flutter/flutter#133353 Tree is failing on Mac and Linux customer_testing on this PR. https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20customer_testing/14646/overview https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20customer_testing/14974/overview
-
Victoria Ashworth authored
Reverts flutter/flutter#133352 Tree is failing on Mac and Linux customer_testing on this PR. https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20customer_testing/14646/overview https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20customer_testing/14974/overview
-
Victoria Ashworth authored
Reverts flutter/flutter#133356 Tree is failing on customer_testing on this PR. https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20customer_testing/14646/overview
-
Polina Cherkasova authored
-
Polina Cherkasova authored
-
Justin McCandless authored
Fix a Google test flakiness increase.
-
Salmanul Farisi.M authored
Paginated datatable widget cannot give color to table header fixes #132428 --------- Co-authored-by:
Hans Muller <hansmuller@google.com>
-
Polina Cherkasova authored
-
- 26 Aug, 2023 1 commit
-
-
Polina Cherkasova authored
-
- 25 Aug, 2023 6 commits
-
-
Chinmoy authored
This PR adds onWillAcceptWithDetails callback to DragTarget to get information about offset. Fixes: #131378 This PR is subject to changes based on #131542
-
Kate Lovett authored
-
gmilou authored
-
Taha Tesser authored
fixes [`PopupMenuItem` with a `ListTile` doesn't use the correct text style.](https://github.com/flutter/flutter/issues/133138) ### Description This fixes an issue text style issue for `PopupMenuItem` with a `ListTile` (for an elaborate popup menu) https://api.flutter.dev/flutter/material/PopupMenuItem-class.html <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; /// Flutter code sample for [PopupMenuButton]. // This is the type used by the popup menu below. enum SampleItem { itemOne, itemTwo, itemThree } void main() => runApp(const PopupMenuApp()); class PopupMenuApp extends StatelessWidget { const PopupMenuApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, textTheme: const TextTheme( labelLarge: TextStyle( fontStyle: FontStyle.italic, fontWeight: FontWeight.bold, ), ), ), home: const PopupMenuExample(), ); } } class PopupMenuExample extends StatefulWidget { const PopupMenuExample({super.key}); @override State<PopupMenuExample> createState() => _PopupMenuExampleState(); } class _PopupMenuExampleState extends State<PopupMenuExample> { SampleItem? selectedMenu; @override Widget build(BuildContext context) { return Scaffold( body: Center( child: SizedBox( width: 300, height: 130, child: Align( alignment: Alignment.topLeft, child: PopupMenuButton<SampleItem>( initialValue: selectedMenu, // Callback that sets the selected popup menu item. onSelected: (SampleItem item) { setState(() { selectedMenu = item; }); }, itemBuilder: (BuildContext context) => <PopupMenuEntry<SampleItem>>[ const PopupMenuItem<SampleItem>( value: SampleItem.itemOne, child: Text('PopupMenuItem'), ), const CheckedPopupMenuItem<SampleItem>( checked: true, value: SampleItem.itemTwo, child: Text('CheckedPopupMenuItem'), ), const PopupMenuItem<SampleItem>( value: SampleItem.itemOne, child: ListTile( leading: Icon(Icons.cloud), title: Text('ListTile'), contentPadding: EdgeInsets.zero, trailing: Icon(Icons.arrow_right_rounded), ), ), ], ), ), ), ), ); } } ``` </details> ### Before  ### After 
-
Taha Tesser authored
fixes [Chip border side color not working in Material3](https://github.com/flutter/flutter/issues/132922) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, chipTheme: const ChipThemeData( // shape: RoundedRectangleBorder( // side: BorderSide(color: Colors.amber), // borderRadius: BorderRadius.all(Radius.circular(12)), // ), // side: BorderSide(color: Colors.red), ), ), home: const Example(), ); } } class Example extends StatelessWidget { const Example({super.key}); @override Widget build(BuildContext context) { return const Scaffold( body: Center( child: RawChip( shape: RoundedRectangleBorder( side: BorderSide(color: Colors.amber), borderRadius: BorderRadius.all(Radius.circular(12)), ), // side: BorderSide(color: Colors.red), label: Text('Chip'), ), ), ); } } ``` </details> --- ### Before When `RawChip.shape` is provided with a `BorderSide`. ```dart body: Center( child: RawChip( shape: RoundedRectangleBorder( side: BorderSide(color: Colors.amber), borderRadius: BorderRadius.all(Radius.circular(12)), ), label: Text('Chip'), ), ), ```  When `RawChip.shape` is provided with a `BorderSide` and also `RawChip.side` is provided. The `RawChip.side` overrides the shape's side. ```dart body: Center( child: RawChip( shape: RoundedRectangleBorder( side: BorderSide(color: Colors.amber), borderRadius: BorderRadius.all(Radius.circular(12)), ), side: BorderSide(color: Colors.red), label: Text('Chip'), ), ), ```  --- ### After When `RawChip.shape` is provided with a `BorderSide`. ```dart body: Center( child: RawChip( shape: RoundedRectangleBorder( side: BorderSide(color: Colors.amber), borderRadius: BorderRadius.all(Radius.circular(12)), ), label: Text('Chip'), ), ), ```  When `RawChip.shape` is provided with a `BorderSide` and also `RawChip.side` is provided. The `RawChip.side` overrides the shape's side. ```dart body: Center( child: RawChip( shape: RoundedRectangleBorder( side: BorderSide(color: Colors.amber), borderRadius: BorderRadius.all(Radius.circular(12)), ), side: BorderSide(color: Colors.red), label: Text('Chip'), ), ), ```  ---
-
Tomasz Gucio authored
-
- 24 Aug, 2023 5 commits
-
-
Ian Hickson authored
...and add a test so we remember to keep it in sync.
-
Ian Hickson authored
-
Henry Riehl authored
Adds a `hoverDuration` property to the `Inkwell` widget. This allows the user to customise how long the change in colour animates between the default colour and the hovered colour. https://github.com/flutter/flutter/assets/73116038/2e7c5ccb-8651-4e08-8c7b-225cc005d594 Fixes #132170
-
Polina Cherkasova authored
-
LongCatIsLooong authored
Remove `ImageProvider.load`, `DecoderCallback` and `PaintingBinding.instantiateImageCodec` (#132679) ~The failing plugin tests should pass once https://github.com/flutter/packages/pull/4725 lands and rolls into flutter/flutter~ google tests are migrated. Part of https://github.com/flutter/flutter/issues/133171 ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
- 23 Aug, 2023 5 commits
-
-
Kate Lovett authored
Part of https://github.com/flutter/flutter/issues/133171
-
Kate Lovett authored
Part of https://github.com/flutter/flutter/issues/133171
-
Polina Cherkasova authored
-
Michael Goderbauer authored
Blocking issue (https://github.com/dart-lang/linter/issues/453) for this lint has been resolved.
-
Ian Hickson authored
-
- 22 Aug, 2023 4 commits
-
-
Taha Tesser authored
Related https://github.com/flutter/flutter/issues/131676 ## Description #### Fix default input text style for `DropdownMenu`  ### Fix default text style for `MenuAnchor`'s menu items (which `DropdownMenu` uses for menu items)  ### Default `DropdownMenu` Input text style  ### Default `DropdownMenu` menu item text style  ### Default `MenuAnchor` menu item text style  ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; /// Flutter code sample for [DropdownMenu]s. The first dropdown menu has an outlined border. void main() => runApp(const DropdownMenuExample()); class DropdownMenuExample extends StatefulWidget { const DropdownMenuExample({super.key}); @override State<DropdownMenuExample> createState() => _DropdownMenuExampleState(); } class _DropdownMenuExampleState extends State<DropdownMenuExample> { final TextEditingController colorController = TextEditingController(); final TextEditingController iconController = TextEditingController(); ColorLabel? selectedColor; IconLabel? selectedIcon; @override Widget build(BuildContext context) { final List<DropdownMenuEntry<ColorLabel>> colorEntries = <DropdownMenuEntry<ColorLabel>>[]; for (final ColorLabel color in ColorLabel.values) { colorEntries.add( DropdownMenuEntry<ColorLabel>( value: color, label: color.label, enabled: color.label != 'Grey'), ); } final List<DropdownMenuEntry<IconLabel>> iconEntries = <DropdownMenuEntry<IconLabel>>[]; for (final IconLabel icon in IconLabel.values) { iconEntries .add(DropdownMenuEntry<IconLabel>(value: icon, label: icon.label)); } return MaterialApp( theme: ThemeData( useMaterial3: true, colorSchemeSeed: Colors.green, // textTheme: const TextTheme( // bodyLarge: TextStyle( // fontWeight: FontWeight.bold, // fontStyle: FontStyle.italic, // decoration: TextDecoration.underline, // ), // ), ), home: Scaffold( body: SafeArea( child: Column( children: <Widget>[ const Text('DropdownMenus'), Padding( padding: const EdgeInsets.symmetric(vertical: 20), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ DropdownMenu<ColorLabel>( controller: colorController, label: const Text('Color'), dropdownMenuEntries: colorEntries, onSelected: (ColorLabel? color) { setState(() { selectedColor = color; }); }, ), const SizedBox(width: 20), DropdownMenu<IconLabel>( controller: iconController, enableFilter: true, leadingIcon: const Icon(Icons.search), label: const Text('Icon'), dropdownMenuEntries: iconEntries, inputDecorationTheme: const InputDecorationTheme( filled: true, contentPadding: EdgeInsets.symmetric(vertical: 5.0), ), onSelected: (IconLabel? icon) { setState(() { selectedIcon = icon; }); }, ), ], ), ), const Text('Plain TextFields'), Padding( padding: const EdgeInsets.symmetric(vertical: 20), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ SizedBox( width: 150, child: TextField( controller: TextEditingController(text: 'Blue'), decoration: const InputDecoration( suffixIcon: Icon(Icons.arrow_drop_down), labelText: 'Color', border: OutlineInputBorder(), )), ), const SizedBox(width: 20), SizedBox( width: 150, child: TextField( controller: TextEditingController(text: 'Smile'), decoration: const InputDecoration( prefixIcon: Icon(Icons.search), suffixIcon: Icon(Icons.arrow_drop_down), filled: true, labelText: 'Icon', )), ), ], ), ), if (selectedColor != null && selectedIcon != null) Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text( 'You selected a ${selectedColor?.label} ${selectedIcon?.label}'), Padding( padding: const EdgeInsets.symmetric(horizontal: 5), child: Icon( selectedIcon?.icon, color: selectedColor?.color, ), ) ], ) else const Text('Please select a color and an icon.') ], ), ), ), ); } } enum ColorLabel { blue('Blue', Colors.blue), pink('Pink', Colors.pink), green('Green', Colors.green), yellow('Yellow', Colors.yellow), grey('Grey', Colors.grey); const ColorLabel(this.label, this.color); final String label; final Color color; } enum IconLabel { smile('Smile', Icons.sentiment_satisfied_outlined), cloud( 'Cloud', Icons.cloud_outlined, ), brush('Brush', Icons.brush_outlined), heart('Heart', Icons.favorite); const IconLabel(this.label, this.icon); final String label; final IconData icon; } ``` </details>
-
Taha Tesser authored
fixes [Long `FlexibleSpaceBar.title` doesn't respect the leading widget ](https://github.com/flutter/flutter/issues/132030) ### Description - This adds `FlexibleSpaceBarSettings.hasLeading` for the `FlexibleSpaceBar`'s title to respect the leading widget. - Use the new `FlexibleSpaceBarSettings.hasLeading` property in the `SliverAppBar` for its `FlexibleSpaceBar`. ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( useMaterial3: true, brightness: Brightness.dark, ), home: const Example(), ); } } class Example extends StatelessWidget { const Example({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Text('TargetPlatform.Android'), Theme( data: Theme.of(context).copyWith( platform: TargetPlatform.android, ), child: Container( height: 250, padding: const EdgeInsets.all(8), decoration: BoxDecoration( border: Border.all( color: Colors.amber, width: 4, ), ), child: const AppBarLeading( showLeading: true, showTitle: false, ), ), ), const Text('TargetPlatform.iOS'), Theme( data: Theme.of(context).copyWith( platform: TargetPlatform.iOS, ), child: Container( height: 250, padding: const EdgeInsets.all(8), decoration: BoxDecoration( border: Border.all( color: Colors.amber, width: 2, ), ), child: const AppBarLeading( showLeading: true, showTitle: false, ), ), ), ], ), ); } } class AppBarLeading extends StatelessWidget { const AppBarLeading({ super.key, required this.showLeading, required this.showTitle, }); final bool showLeading; final bool showTitle; @override Widget build(BuildContext context) { return Scaffold( drawer: const Drawer(), body: CustomScrollView( slivers: [ SliverAppBar( automaticallyImplyLeading: showLeading, iconTheme: const IconThemeData( color: Colors.amber, ), title: showTitle ? const Text('AppBar') : null, flexibleSpace: FlexibleSpaceBar( title: Text('Title ' * 15), // centerTitle: true, ), toolbarHeight: showTitle ? 170 : 100, ), ], ), ); } } ``` </details> ### Before  ### After 
-
Justin McCandless authored
Diposes some restorable variables that weren't disposed before.
-
Kate Lovett authored
Fixes https://github.com/flutter/flutter/issues/132788 The SliverGeometry was not set properly for SliverMainAxisGroup. Omitting hasVisualOverflow affected the Viewport's choice to apply a clip, leading to the sliver being rendered outside of the bounds of the viewport.
-
- 21 Aug, 2023 2 commits
-
-
Justin McCandless authored
When you type a single or double quote character on the default iOS keyboard, it doesn't actually insert the usual `'` or `"`. Instead, it inserts a directional version that tries to match with others. This is very tricky when allow/deny-listing characters, so I've added a section about this to the docs. Fixes https://github.com/flutter/flutter/issues/132232
-
fzyzcjy authored
When resized network image has error, all future unrelated images using the same url will fail, even if the network becomes OK (#127456) Close #127265 The CI fails because of simple analyzer errors. Thus, I would like to hear your opinions first!
-
- 18 Aug, 2023 1 commit
-
-
Renzo Olivares authored
SelectionArea on iOS should toggle the context menu when tapping on the previous selection (#132851) https://github.com/flutter/flutter/assets/948037/210fdee4-d922-422b-a257-4ee586a3814f Related: https://github.com/flutter/flutter/issues/129583
-