* added ListTile.textAlignment
* changed titlesHeight to titleHeight
* fixed a typo
* Add tests and example
* Update tests
* update example test
---------
Co-authored-by: tahatesser <tessertaha@gmail.com>
* Don't call `PlatformViewCreatedCallback`s after `AndroidViewController` is disposed
Before this change it was possible that, if a `AndroidViewController` was disposed before we got the notification that the platform view was created, `PlatformViewCreatedCallback`s where called even after calling `AndroidViewController.dispose`.
Also makes `_PlatformViewLinkState._onPlatformViewCreated` more carful to only call `setState` when mounted.
Closes#84628Closes#96384
* Allow all widgets to remove listeners from controller
* Remove assert
* Add expectations to test
* Removed "if" on resolving text color at "SnackBarAction"
Removed multiple "if" for "resolveForegroundColor" method at "SnackBarAction". At least one of the multiple "if" ("defaults.actionTextColor is MaterialStateColor") led to not applying a custom set color (e.g. MaterialColor "Colors.red") for the action text when using Material 3.
The second "if" ("snackBarTheme.actionTextColor is MaterialStateColor") also makes no sense then as the set color of the Theme would lead to the same blocking behaviour of manual color assignment.
The last remaining "if" ("widget.textColor is MaterialStateColor") will be unnecessary if the other "if" will be removed, as it will be resolved in the code right afterwards.
The three "if" also seems to block the usage of the custom text color or the color at all if the widget is in the "MaterialState.disabled" state.
* Adjusted recent modifications to SnackBarAction's text color resolution
* Now the "widget.textColor" is checked if it is set.
* If it is a MaterialStateColor, it will be used
* Otherwise continue with normal resolution (It will be used in the resolution anyways because it's set)
* Repeat same steps with "snackBarTheme.actionTextColor" if previous was not set
* Repeat same steps with "defaults.actionTextColor" if previous was not set
* Reverted the auto formatting changes
* Added two test cases to "snack_bar_test"
* Test for setting a MaterialColor to a SnackBarAction' label (M3)
* Test for setting a MaterialStateColor to a SnackBarAction' label (M3)
* Renamed test cases "Snackbar labels can be colored"
* Add trackOutlineColor for Switch and SwitchListTile
* Update tests
* Update test
* Clean up unnecessary StatefulBUilder in tests
* Fix failed test
---------
Co-authored-by: Qun Cheng <quncheng@google.com>
* Add support for extending selection to paragraph on ctrl + shift + arrow up/down for common keyboard actions
* Add ctrl + shift + arrow up/down common text editing shortcuts/actions
* fix analyzer
---------
Co-authored-by: Renzo Olivares <roliv@google.com>
* Add test for RenderProxyBoxMixin; clarify doc, resolve TODO
The TODO comment suggested this mixin would no longer be needed once
a Dart issue on inherited constructors was fixed:
https://github.com/dart-lang/sdk/issues/31543
That issue is now long since fixed, so I went to go carry out the TODO.
But in doing so, I realized that the mixin's documentation was more
right than the TODO comment: even with that issue fixed, there is a
legitimate use case for this mixin, namely to reuse the implementation
of RenderProxyBox in a class that also inherits from some other base
class. Moreover, searching GitHub I found an example of a library
that makes real use of that capability.
So I think the right resolution is to accept that this separation
is useful and delete the TODO.
Then, add a test with an extremely simplified sketch of that
real-world example. In case someone in the future attempts to
simplify this mixin away, the test will point us at the use case
that would be broken by such a change.
Also remove the only in-tree use of the mixin, which was redundant;
and expand the mixin's documentation to advise about that case.
* Tweak formatting
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
* Cut comments
---------
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
* Add Material 3 `SwitchListTile` example and update existing examples
* Update examples with `useMaterial3: true` and update example descriptions.
* add a `ColorScheme` colour
* Fix anchorBelow calculation, and share toolbar padding constant
* Fix constant references in test
* Test below position when padding is not offset by content distance