* 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
* 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>
* Add support for image insertion on Android
* Fix checks
* Use proper Dart syntax on snippet
* Specify type annotation on list
* Fix nits, add some asserts, and improve example code
* Add missing import
* Fix nullsafety error
* Fix nullsafety error
* Remove reference to contentCommitMimeTypes in docs
* Fix nits
* Fix warnings and import
* Add test for content commit in editable_text_test.dart
* Check that URIs are equal in test
* Fix nits and rename functions / classes to be more self-explanatory
* Fix failing debugFillProperties tests
* Add empty implementation to `insertContent` in TextInputClient
* Tweak documentation slightly
* Improve docs for contentInsertionMimeTypes and fix assert
* Rework contentInsertionMimeType asserts
* Add test for onContentInserted example
* Switch implementation to a configuration class for more granularity in setting mime types
* Fix nits
* Improve docs and fix doc tests
* Fix more nits (LongCatIsLooong)
* Fix failing tests
* Make parameters (guaranteed by platform to be non-nullable) non-nullable
* Fix analysis issues
* attempt to extend to paragraph
* second attempt
* clean up implementation
* clean up
* updates
* updates
* Fix implementation
* remove old
* update docs
* update docs
* fix analyzer
* Fix bug where new line character was selected and backwards selection failed
* remove print
* Add test for paragraph boundary
* Add text editing test for extending selection to paragraph for mac and ios
* rename to ExtendSelectionToParagraphBoundaryIntent
* fix analyzer
* Should default to downstream when collapsing selection
* get rid of _getParagraphAtOffset and move into getTextBoundaryAt
* Search for all line terminators
* iterate through code units instead of characters
* Address some reviewer comments"
* Add separate implementations for leading and trailing paragraph boundary methods
* Do not break after a carriage return if it is followed by a line feed
* test carriage return followed by a line feed
* more tests
* Do not continue if the line terminator is at the target text offset
* add hack to extend highlight to line terminator
* Revert "add hack to extend highlight to line terminator"
This reverts commit b4d3c434539b66c3c81c215e87c645b425902825.
* Revert "Do not continue if the line terminator is at the target text offset"
This reverts commit 789e1b838e54e7c25600bfa8852e59431ccaf5dc.
* Update ParagraphBoundary with latest TextBoundary changes
* Update implementation to iterate through indexes
* update getTrailingTextBoundaryAt to include the line terminator
* Updates
* more updates
* more updates
* updates
* updates
* Lets try this again
* clean up
* updates
* more updates
* updates
* fix
* Re-implement using custom paragraph boundary applying method
* Revert "Re-implement using custom paragraph boundary applying method"
This reverts commit cd2f7f4b6eb6726b28f82a43708812e06a49df95.
* Revert "fix"
This reverts commit 8ec1f8f58935cfb3eb86dc6afd2894537af4cf7b.
* updates
* Revert "updates"
This reverts commit 9dcca4a0031fe18ada9d6ffbbe77ba09918e82ae.
* Revert "Revert "fix""
This reverts commit 9cc1332cd3041badc472d0d223a106203e46afb8.
* Revert "Revert "Re-implement using custom paragraph boundary applying method""
This reverts commit 1acb606fb743fd840da20cca26d9a7c26accb71d.
* Fix paragraph boundaries
* Add failing test
* Address some comments
* group tests and fix analyzer
* fix typo
* fix remaining test
* updates
* more fixes and logs
* clean up and add another test
* Fix last test
* Add new test
* Clean up
* more clean up
* clean up comments
* address comments
* updates
* return null when position is out of bounds and 0 or end of text if appropriate
* Clean up cases
* Do not return null when OOB in the direction of iteration
* clean up
* simplify implementation thanks to LongCatIsLooong feedback
* Address comments
* Add line and paragraph separator
* Use _moveBeyondTextBoundary instead of custom _moveToParagraphBoundary
* Change some intent names and revert fromPosition change
* clean up docs
---------
Co-authored-by: Renzo Olivares <roliv@google.com>
* 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
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
* add position to layout creation
* make position nullable
* fix tests
* test
* clear test size
* clear device pixel ratio
* add more documentaiton
* add comment about localToGlobal
Relands the "Scribble mixin" PR, which was reverted due to breaking a Google test in the last roll.
Breaks the Scribble feature out of TextInputClient in order to avoid breaking changes.