* 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>
* Fix anchorBelow calculation, and share toolbar padding constant
* Fix constant references in test
* Test below position when padding is not offset by content distance
* Make _focusDebug not interpolate in debug mode
* Add test
* Revert undesired change
* Fix test to fail before too
* Remove accidental skips
* Switch to using a generating closure for arguments.
* Remove a word
* add asset manifest bin loading and asset manifest api
* use new api for image resolution
* remove upfront smc data casting
* fix typecasting issue
* remove unused import
* fix tests
* lints
* lints
* fix import
* revert image resolution changes
* Update image_resolution_test.dart
* Update decode_and_parse_asset_manifest.dart
* make targetDevicePixelRatio optional
* Update packages/flutter/lib/src/services/asset_manifest.dart
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* Update packages/flutter/lib/src/services/asset_manifest.dart
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* fix immutable not being imported
* return List in AssetManifest methods, fix annotation import
* simplify onError callback
* make AssetManifest methods abstract instead of throwing UnimplementedError
* simplify AssetVariant.key docstring
* tweak _AssetManifestBin docstring
* make AssetManifest and AssetVariant doc strings more specific
* use List.of instead of List.from for type-safety
* adjust import
* change _AssetManifestBin comment from doc comment to normal comment
* revert to callback function for onError in loadStructuredBinaryData
* add more to the docstring of AssetManifest.listAssets and AssetVariant.key
* add tests for CachingAssetBundle caching behavior
* add simple test to ensure loadStructuredBinaryData correctly calls load
* Update asset_manifest.dart
* update docstring for AssetManifest.getAssetVariants
* rename getAssetVariants, have it include main asset
* rename isMainAsset field of AssetMetadata to main
* (slightly) shorten name of describeAssetAndVariants
* rename describeAssetVariants back to getAssetVariants
* add tests for TestAssetBundle
* nits
* fix typo in docstring
* remove no longer necessary non-null asserts
* update gallery and google_fonts versions
---------
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* Check whether slider is mounted before interaction, no-op if unmounted (#113556)
* Check whether slider is unmounted before interaction
* Update slider.dart
* Update Slider
* Add test
* Update slider_test.dart
* Update packages/flutter/test/material/slider_test.dart
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
* exposed tooltip longPress action when available
* updated tooltip test
* updated date picker test
---------
Co-authored-by: Mingyu <lyming90@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Harper Liu <harperl0818@gmail.com>