Kostia Sokolovskyi
854bbb901c
Fix memory leak in CupertinoActionSheet ( #134885 )
2023-09-16 14:59:13 -07:00
Polina Cherkasova
72b69f9449
Date picker dialog state should dispose members. ( #134804 )
2023-09-15 08:55:50 -07:00
Bruno Leroux
2a7ad01e55
Fix navigation rail hover misplaced when direction is RTL and extended is true ( #134815 )
...
## Description
This PR fixes `NavigationRail` hover position when text direction is set to RTL and `NavigationRail.extended` is true.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/134361 .
## Tests
Adds 1 test.
2023-09-15 15:15:06 +00:00
Kostia Sokolovskyi
09acfe6341
Fix memory leak in ListWheelScrollView ( #134732 )
2023-09-14 20:52:22 -07:00
chunhtai
0e521942a3
Allows page removal that contains Localhistoryentry ( #134757 )
...
fixes https://github.com/flutter/flutter/issues/97836
fixes https://github.com/flutter/flutter/issues/134752
fixes https://github.com/flutter/flutter/issues/118645
2023-09-14 21:00:55 +00:00
Alex Li
5c09ccad39
🐛 Setup color tween for RefreshIndicator in a better way ( #134492 )
...
Fixes https://github.com/flutter/flutter/issues/134489 .
2023-09-14 18:29:18 +00:00
Bruno Leroux
9fa09ea4d3
Fix NavigationRail hover misplaced when using large icons ( #134719 )
...
## Description
This PR fixes `NavigationRail` hover position when using enlarged icons whose size is specified using `NavigationRailThemeData.selectedIconTheme` and `NavigationRailThemeData.unselectedIconTheme`.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/133799 .
## Tests
Adds 1 test, updates 1 test (to replace some magic numbers).
2023-09-14 17:03:40 +00:00
Justin McCandless
4db47db177
LinkedText (Linkify) ( #125927 )
...
New LinkedText widget and TextLinker class for easily adding hyperlinks to text.
2023-09-13 20:39:58 -07:00
Polina Cherkasova
ee9aef0130
_DayPicker should build days using separate stetefull widget _Day. ( #134607 )
...
Fixes https://github.com/flutter/flutter/issues/134323
2023-09-13 19:48:22 -07:00
LongCatIsLooong
b2f3404ca0
Remove Path.combine call from CupertionoTextSelectionToolbar ( #134369 )
...
Hopefully this fixes https://github.com/flutter/flutter/issues/110076 by removing the `Path.combine` call. Not sure how I can verify in a test that `Path.combine` is not called.
2023-09-13 23:27:13 +00:00
Kate Lovett
2ea9edc1ad
Update KeepAlive.debugTypicalAncestorWidgetClass ( #133498 )
2023-09-13 18:16:14 -05:00
Delwin Mathew
b4953c3769
Fix null check crash by ReorderableList ( #132153 )
...
Fix issue where if you drag the last element of `ReorderableList` and put it in the same index, a `Null check` error arises. This happens as index in `_items` is out of bounds (when `reverse: true`). Fix is to check if last element, dragged element and drop index is same, and return as nothing has changed. Find this video attached.
https://github.com/flutter/flutter/assets/84124091/8043cac3-eb08-42e1-87e7-8095ecab09dc
Fixes issue #132077
2023-09-13 22:55:05 +00:00
hangyu
ab1b865e58
Dispose routes in navigator when throwing exception ( #134596 )
...
fixes : #133695
## 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
2023-09-13 12:36:51 -07:00
Jonah Williams
2daf917717
[framework] reduce ink sparkle uniform count. ( #133897 )
...
Fixes https://github.com/flutter/flutter/issues/133325
Due to the number of uniforms present, the ink_sparkle shader can't run without post processing (on all target platforms) that the impellerc offline compiler doesn't perform. However, we can't just move the uniforms into a uniform buffer object (UBO) because the Skia backend doesn't support it.
Rather than work around this in the compiler, we can reduce the uniform count by 1) packing four floats into a single vec4 2) removing a uniform for what is effectively a constant.
This should have no visible effects, and if any scubas fail it means I did this wrong ð
2023-09-13 19:29:06 +00:00
Hans Muller
61b890bfcb
Updated MaterialStatesController class api doc ( #134592 )
...
Resolves
https://github.com/flutter/flutter/pull/133977#discussion_r1320373180
2023-09-13 10:33:08 -07:00
chrisdlangham
15b00bf6a7
removed unused variable in the example code of semantic event ( #134551 )
...
removes unused variable in the example code of semantic events
https://api.flutter.dev/flutter/semantics/FocusSemanticEvent-class.html
2023-09-13 02:52:25 +00:00
Polina Cherkasova
cef737c412
_YearPicker should dispose ScrollController and MaterialSatesController. ( #134393 )
2023-09-12 17:44:18 -07:00
Bruno Leroux
083ac65c51
Fix TabBarView desynchronized after animation interruption ( #132748 )
2023-09-12 18:09:26 -05:00
LongCatIsLooong
dc8377b1d4
Ensure OverlayPortal.overlayChild's renderObject is reachable via treewalk ( #134497 )
...
Fixes https://github.com/flutter/flutter/issues/133545
` child._layoutSurrogate.markNeedsLayout();` was called when `_skipMarkNeedsLayout` is set true so when there's no relayout boundary between the layout surrogate and the RenderTheater, no dirty render objects will be added to the PipelineOwner's dirty list.
It's ok to mark the RenderTheater dirty when there's no layout boundary between it and the layout surrogate.
2023-09-12 22:41:45 +00:00
Kate Lovett
fcba7b3dc2
Fix SliverList example descriptions ( #134483 )
...
Fixes https://github.com/flutter/flutter/issues/134142
The description for the SliverList.list example was just wrong, describing something other than the sample. ð
Tweaked some of the language on the others while I was here.
2023-09-12 22:38:23 +00:00
Kate Lovett
4e7a07af88
Remove chip tooltip deprecations ( #134486 )
...
Part of https://github.com/flutter/flutter/issues/133171
These deprecations were introduced in https://github.com/flutter/flutter/pull/96174
The replacement is to use `deleteButtonTooltipMessage`.
This migration is supported by dart fix. â
2023-09-12 18:23:52 +00:00
Kate Lovett
90ae98f576
Remove deprecated TextSelectionOverlay.fadeDuration ( #134485 )
...
Part of https://github.com/flutter/flutter/issues/133171
This was deprecated in https://github.com/flutter/flutter/pull/100381
Th replacement is to use `SelectionOverlay.fadeDuration` instead.
This migration is supported by dart fix. â
2023-09-12 17:14:18 +00:00
chunhtai
5900c4baa7
Revert "Adds a parent scope TraversalEdgeBehavior and fixes modal rou… ( #134550 )
...
…te to no… (#130841 )"
This reverts commit 0f3bd90d9b108904cc0390e899c2b3c6ee2e76e0.
Internal test needs migration
## 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
2023-09-12 09:18:40 -07:00
xubaolin
a9fac73361
[New feature] Allowing the ListView slivers to have different extents while still having scrolling performance ( #131393 )
...
Fixes https://github.com/flutter/flutter/issues/113431
Currently we only support specifying all slivers to have the same extent.
This patch introduces an `itemExtentBuilder` property for `ListView`, allowing the slivers to have different extents while still having scrolling performance, especially when the scroll position changes drastically(such as scrolling by the scrollbar or controller.jumpTo()).
@Piinks Hi, Any thoughts about this? :)
2023-09-12 02:16:48 +00:00
Kohei Seino
82cb74932f
ScaleGestureRecognizer: make pointerCount public ( #127310 )
...
make `pointCount` in `ScaleGestureRecognizer` public to handle pointer event depending on the number of pointers.
https://github.com/flutter/flutter/issues/127309
2023-09-12 01:01:38 +00:00
Chinmay Kabi
4a3ab6828a
Fix DataTable example not being scrollable ( #131556 )
2023-09-11 18:55:53 -05:00
Kostia Sokolovskyi
e7058f568f
Fix memory leak in RenderAnimatedSize ( #133653 )
...
`AnimationController` and `CurvedAnimation` objects were not disposed in `RenderAnimatedSize`.
### Description
- Fixes https://github.com/flutter/flutter/issues/133903 ;
- Adds the missing `dispose()` calls for `AnimationController` and `CurvedAnimation` in `RenderAnimatedSize`.
### Tests
- Updates `animated_size_test.dart` to test that `AnimationController` and `CurvedAnimation` are disposed after `RenderSize` disposal.
2023-09-11 20:46:04 +00:00
Renzo Olivares
2c477b1812
SelectableRegion onSelectionChange should be called when the selection changes ( #134215 )
...
This change makes sure to call `onSelectionChange` in all cases when selection might change including:
* Dragging selection handles
* Mouse drag to select
* Keyboard actions
* Long press drag to select
2023-09-09 22:03:23 +00:00
Polina Cherkasova
5555836712
Day picker should dispose created MaterialStatesController's. ( #133884 )
...
Fixes https://github.com/flutter/flutter/issues/133862
2023-09-09 08:45:27 -07:00
Kostia Sokolovskyi
5d5da38810
Fix memory leak in _DraggableScrollableSheetState ( #134212 )
2023-09-08 15:06:26 -07:00
Polina Cherkasova
834f5dc296
RestorationManager should dispatch creation in constructor. ( #133911 )
2023-09-08 15:05:43 -07:00
LongCatIsLooong
621ad9872c
Remove TextPainter migration flag from the framework ( #134274 )
...
The migration flag in `ParagraphBuilder` will be removed next.
2023-09-08 22:01:52 +00:00
Renzo Olivares
97cdc0ec07
InputDecoration.error should activate error state ( #134001 )
...
When passed an `error` widget, `InputDecoration` should activate its error state. Before this change the `errorBorder` would only activate if an `errorText` was provided. This change solves this issue by accounting for a provided `error` widget.
2023-09-08 22:01:50 +00:00
Taha Tesser
90c524dcdf
Update chip docs to clarify how to specify a shape with no border & explain default values for Material 3 ( #134298 )
...
fixes [Update chip docs for Material 3 defaults.](https://github.com/flutter/flutter/issues/134296 )
Addresses a [comment](https://github.com/flutter/flutter/pull/133856#discussion_r1313513284 ) from @HansMuller as well
2023-09-08 19:41:18 +00:00
LongCatIsLooong
804a7b285f
Make CupertinoTextField at least as tall as its first line of placeholder ( #134198 )
...
Fixes https://github.com/flutter/flutter/issues/133241
and some CupertinoTextField cleanup.
2023-09-08 16:52:57 +00:00
Greg Spencer
3ce6174e6b
Update links to iOS embedder docs to point to new Doxygen docs ( #134246 )
...
## Description
Now that we are using Doxygen for building docs for the embedders, this updates the links to point to the correct URLs.
## Related Issues
- https://github.com/flutter/flutter/issues/124833
## Related PRs
- https://github.com/flutter/engine/pull/45561
2023-09-08 16:42:50 +00:00
Taha Tesser
bb8de2167a
Fix Drawer examples are missing dartpad tag ( #134219 )
...
fixes [`Drawer` examples are misssing `dartpad` tag]( https://github.com/flutter/flutter/issues/134217 )
these examples were updated in https://github.com/flutter/flutter/pull/130523
2023-09-08 08:14:05 +00:00
Polina Cherkasova
3ff0beb5fa
_TabBarViewState should dispose created instances of PageController. ( #134091 )
2023-09-07 17:50:45 -07:00
Polina Cherkasova
237ddcc339
Remove non needed controllers in SegmentedButton. ( #134064 )
2023-09-07 17:50:23 -07:00
Polina Cherkasova
161c7090ff
EditableTextState should dispose cursorVisibilityNotifier. ( #133858 )
2023-09-07 17:49:59 -07:00
Polina Cherkasova
cc95ace32c
CupertinoAlertDialog should not create ScrollController on every build, if null values are passed in constructor. ( #134075 )
...
Relanding of https://github.com/flutter/flutter/pull/134071
Verified failed tests succeeded now:
2023-09-07 23:59:58 +00:00
Polina Cherkasova
1c0b4ad53a
_SearchBarState should dispose FocusNode, if it created it. ( #134076 )
...
Relanding of revert: https://github.com/flutter/flutter/pull/134072
Verified failed tests succeeded now:
2023-09-07 23:27:12 +00:00
Taha Tesser
30234a00ee
Fix ExpansionTile properties cannot be updated with setState ( #134218 )
...
fixes [`ExpansionTile` properties aren't updated with `setState`](https://github.com/flutter/flutter/issues/24493 )
### 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 const MaterialApp(
debugShowCheckedModeBanner: false,
home: Example(),
);
}
}
class Example extends StatefulWidget {
const Example({super.key});
@override
State<Example> createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
ShapeBorder collapsedShape = const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(4)),
);
Color collapsedTextColor = const Color(0xffffffff);
Color collapsedBackgroundColor = const Color(0xffff0000);
Color collapsedIconColor = const Color(0xffffffff);
ShapeBorder shape = const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16)),
);
Color backgroundColor = const Color(0xffff0000);
Color textColor = const Color(0xffffffff);
Color iconColor = const Color(0xffffffff);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ExpansionTile(
shape: shape,
backgroundColor: backgroundColor,
textColor: textColor,
iconColor: iconColor,
collapsedShape: collapsedShape,
collapsedTextColor: collapsedTextColor,
collapsedBackgroundColor: collapsedBackgroundColor,
collapsedIconColor: collapsedIconColor,
title: const Text('Collapsed ExpansionTile'),
children: const [
ListTile(
title: Text('Revealed!'),
),
],
),
const SizedBox(height: 16),
ExpansionTile(
shape: shape,
backgroundColor: backgroundColor,
textColor: textColor,
iconColor: iconColor,
initiallyExpanded: true,
title: const Text('Expanded ExpansionTile'),
children: const [
ListTile(
title: Text('Revealed!'),
),
],
),
const SizedBox(height: 16),
FilledButton(
onPressed: () {
setState(() {
collapsedShape = const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(50)),
);
collapsedTextColor = const Color(0xfff00000);
collapsedBackgroundColor = const Color(0xffffff00);
collapsedIconColor = const Color(0xfff00000);
shape = const RoundedRectangleBorder();
backgroundColor = const Color(0xfffff000);
textColor = const Color(0xfff00000);
iconColor = const Color(0xfff00000);
});
},
child: const Text('Update properties'),
),
],
),
),
),
);
}
}
```
</details>
### Before
https://github.com/flutter/flutter/assets/48603081/b29aed98-38ff-40a3-9ed3-c4342ada35b6
### After
https://github.com/flutter/flutter/assets/48603081/5e0b6a34-c577-40ed-8456-7ef55caa277b
2023-09-07 21:55:32 +00:00
Polina Cherkasova
12e6ff2c54
DropdownRoutePage should dispose the created ScrollController. ( #133941 )
2023-09-07 11:30:43 -07:00
Polina Cherkasova
0d198c7ba6
SearchDelegate should dispose resources. ( #133948 )
2023-09-07 11:13:55 -07:00
Matheus Kirchesch
2867b31f5e
Fixed [NavigationRailDestination]'s label opacity while disabled not being coherent with the icon ( #132345 )
...
Fixing the opacity of the NavigationRailDestination widget label while
it is disabled, right now it doesn't get affected by the disabled
attribute, which doesn't match the icon that gets affected
* https://github.com/flutter/flutter/issues/132344
I believe this PR should be marked as [test-exempt]
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
2023-09-07 10:21:52 -07:00
Taha Tesser
f5355af4a3
Fix TabBar doesn't use labelStyle & unselectedLabelStyle color ( #133989 )
...
Fixes [TabBar labelStyle.color and unselectedLabelStyle.color does not take effect](https://github.com/flutter/flutter/issues/109484 )
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
/// Flutter code sample for [TabBar].
const Color labelColor = Color(0xFFFF0000);
const Color unselectedLabelColor = Color(0x95FF0000);
const TextStyle labelStyle = TextStyle(
color: Color(0xff0000ff),
fontWeight: FontWeight.bold,
);
const TextStyle unselectedLabelStyle = TextStyle(
color: Color(0x950000ff),
fontStyle: FontStyle.italic,
);
void main() => runApp(const TabBarApp());
class TabBarApp extends StatelessWidget {
const TabBarApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: true),
home: const TabBarExample(),
);
}
}
class TabBarExample extends StatelessWidget {
const TabBarExample({super.key});
@override
Widget build(BuildContext context) {
return DefaultTabController(
initialIndex: 1,
length: 3,
child: Scaffold(
appBar: AppBar(
title: const Text('TabBar Sample'),
bottom: const TabBar(
// labelColor: labelColor,
// unselectedLabelColor: unselectedLabelColor,
labelStyle: labelStyle,
unselectedLabelStyle: unselectedLabelStyle,
tabs: <Widget>[
Tab(
icon: Icon(Icons.cloud_outlined),
text: 'Cloudy',
),
Tab(
icon: Icon(Icons.beach_access_sharp),
text: 'Sunny',
),
Tab(
icon: Icon(Icons.brightness_5_sharp),
text: 'Rainy',
),
],
),
),
body: const TabBarView(
children: <Widget>[
Center(
child: Text("It's cloudy here"),
),
Center(
child: Text("It's rainy here"),
),
Center(
child: Text("It's sunny here"),
),
],
),
),
);
}
}
```
</details>
#### When `labelStyle` and `unselectedLabelStyle` are specified with a color.
### Before

### After

2023-09-07 09:19:05 +00:00
Taha Tesser
75797a8a7e
Fix DataTable's headingTextStyle & dataTextStyle are not merged with default text style ( #134138 )
...
fixes [Inconsistent text color on DataTable in different platforms](https://github.com/flutter/flutter/issues/114470 )
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
/// Flutter code sample for [DataTable].
void main() => runApp(const DataTableExampleApp());
class DataTableExampleApp extends StatelessWidget {
const DataTableExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
themeMode: ThemeMode.dark,
theme: ThemeData(),
darkTheme: ThemeData.dark(),
home: Scaffold(
appBar: AppBar(title: const Text('DataTable Sample')),
body: const DataTableExample(),
),
);
}
}
class DataTableExample extends StatelessWidget {
const DataTableExample({super.key});
@override
Widget build(BuildContext context) {
return DataTable(
headingTextStyle: const TextStyle(),
dataTextStyle: const TextStyle(),
columns: const <DataColumn>[
DataColumn(
label: Expanded(
child: Text(
'Name',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Expanded(
child: Text(
'Age',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Expanded(
child: Text(
'Role',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
],
rows: const <DataRow>[
DataRow(
cells: <DataCell>[
DataCell(Text('Sarah')),
DataCell(Text('19')),
DataCell(Text('Student')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('Janine')),
DataCell(Text('43')),
DataCell(Text('Professor')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('William')),
DataCell(Text('27')),
DataCell(Text('Associate Professor')),
],
),
],
);
}
}
```
</details>
### Before
| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/19c3908d-6b6a-4408-9c6b-da83c8efaa4a " /> | <img src="https://github.com/flutter/flutter/assets/48603081/efda08fb-05f9-437e-be5c-6b6861babe19 " width="350" /> |
### After
| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/6bd3433f-d61f-4f35-8a2a-f7539a74f93e " /> | <img src="https://github.com/flutter/flutter/assets/48603081/5123a79b-6c2a-4bea-9fbc-64ed3e599826 " width="350" /> |
2023-09-07 08:55:53 +00:00
Taha Tesser
ded8b8e31c
Reland "Fix Chip.shape's side is not used when provided in Material 3" ( #133856 )
...
fixes [Chip border side color not working in Material3](https://github.com/flutter/flutter/issues/132922 )
Relands https://github.com/flutter/flutter/pull/132941 with an updated fix and a regression test.
<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),
home: const Example(),
);
}
}
class Example extends StatelessWidget {
const Example({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Chips'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
const RawChip(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: BorderSide(color: Colors.red),
label: Text('RawChip'),
),
const Chip(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: BorderSide(color: Colors.red),
label: Text('Chip'),
),
ActionChip(
shape: const RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: const BorderSide(color: Colors.red),
label: const Text('ActionChip'),
onPressed: () {},
),
FilterChip(
shape: const RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: const BorderSide(color: Colors.red),
label: const Text('FilterChip'),
onSelected: (value) {},
),
ChoiceChip(
shape: const RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: const BorderSide(color: Colors.red),
label: const Text('ChoiceChip'),
selected: false,
onSelected: (value) {},
),
InputChip(
shape: const RoundedRectangleBorder(
side: BorderSide(color: Colors.amber),
),
side: const BorderSide(color: Colors.red),
label: const Text('InputChip'),
onSelected: (value) {},
),
],
),
),
);
}
}
```
</details>
<img src="https://github.com/flutter/flutter/assets/48603081/f713fd84-cf9a-4e52-8cdb-5faba63d8e91 " height="450" /> <img src="https://github.com/flutter/flutter/assets/48603081/a142efc7-041e-4e6e-87cf-e6c4ebe735f3 " height="450" />
<img src="https://github.com/flutter/flutter/assets/48603081/377df55b-499f-403f-96c5-0be0334795dc " height="450" /> <img src="https://github.com/flutter/flutter/assets/48603081/731a2752-7822-4605-8e9c-db0a71dd6f08 " height="450" />
2023-09-07 07:58:00 +00:00
Polina Cherkasova
1f0730e67a
DraggableScrollableActuator should dispose notifier. ( #133917 )
2023-09-06 22:07:07 +00:00