424 Commits

Author SHA1 Message Date
Greg Price
a28aae918e
Remove no-shuffle from framework tests, part 1: easy cases (#123751)
Remove no-shuffle from framework tests, part 1: easy cases
2023-03-30 18:28:51 +00:00
Loïc Sharma
70e1dc7387
[Clipboard] Assert at least one clipboard data variant is provided (#122446)
[Clipboard] Assert at least one clipboard data variant is provided
2023-03-24 19:12:10 +00:00
Greg Spencer
bcdab118ba
Add support for application exit requests (#121378)
Add support for application exit requests
2023-03-17 15:35:55 +00:00
Andrew Kolos
313b01658a
Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution" (#122505)
Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution"
2023-03-15 18:17:05 +00:00
Jonah Williams
8d4fd89c74
Revert "Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution (#121322)" (#122449)
Revert "Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution"
2023-03-11 03:30:06 +00:00
Jami Couch
2a67bf78f0
Add support for iOS UndoManager (#98294)
Add support for iOS UndoManager
2023-03-08 19:45:49 +00:00
Andrew Kolos
57c7aa53c1
Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution (#121322)
Reland "Speed up first asset load by using the binary-formatted asset manifest for image resolution
2023-03-06 20:37:43 +00:00
Lioness100
26b6c1bedd
Fix typos (#121171)
* Fix typos

* lowercase animated & opacity

* Undo typo fix

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00:00
Ian Hickson
07c548c698
Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding (#116937) 2023-02-13 23:55:58 +00:00
Kate Lovett
780c9a8de1
Remove deprecated SystemChrome.setEnabledSystemUIOverlays (#119576) 2023-02-10 14:03:01 -06:00
Gabriel Terwesten
ec289f1eb4
Don't call PlatformViewCreatedCallbacks after AndroidViewController is disposed (#116854)
* 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 #84628
Closes #96384

* Allow all widgets to remove listeners from controller

* Remove assert

* Add expectations to test
2023-02-08 18:51:50 +00:00
Andrew Kolos
fd76ef0f26
Reland "Add API for discovering assets" (#119277)
* 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>
2023-02-02 15:17:15 +00:00
Michael Goderbauer
8fd5d4ebb1
Remove deprecated SystemNavigator.routeUpdated method (#119187)
* Remove deprected SystemNavigator.routeUpdated

* test fix
2023-02-01 22:36:11 +00:00
Tanay Neotia
0e22aca785
Add support for image insertion on Android (#110052)
* 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
2023-01-31 19:46:18 +00:00
Renzo Olivares
6c12e39947
Introduce ParagraphBoundary subclass for text editing (#116549)
* 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>
2023-01-30 22:44:26 +00:00
Justin McCandless
17eb2e8aeb
Ability to disable the browser's context menu on web (#118194)
Enables custom context menus on web
2023-01-30 09:03:03 -08:00
Christopher Fujino
a04ab7129b
Revert "Add API for discovering assets (#118410)" (#119273)
This reverts commit 2b8f2d05045590cd4aeb9f02c67baaa69db35e5e.
2023-01-26 20:01:12 +00:00
Andrew Kolos
2b8f2d0504
Add API for discovering assets (#118410)
* 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>
2023-01-26 19:05:00 +00:00
Michael Goderbauer
bb73121cb4
Remove unnecessary null checks in flutter/test (#118905) 2023-01-20 22:09:06 +00:00
Shogo Hida
780563ce05
Add const constructor to TextInputFormatter (#116654)
* Add const constructor to TextInputFormatter

* Fix test

* Add abstract

* Add noSuchMethod

Signed-off-by: Shogo Hida <shogo.hida@gmail.com>

* Add @override and void

Signed-off-by: Shogo Hida <shogo.hida@gmail.com>

* Fix text and position of test

Signed-off-by: Shogo Hida <shogo.hida@gmail.com>

Signed-off-by: Shogo Hida <shogo.hida@gmail.com>
2023-01-18 00:55:33 +00:00
LongCatIsLooong
0a2e0a4730
Avoid using TextAffinity in TextBoundary (#117446)
* Avoid affinity like the plague

* ignore lint

* clean up

* fix test

* review

* Move wordboundary to text painter

* docs

* fix tests
2023-01-05 17:04:15 +00:00
Callum Moffat
c53501d835
Send text direction in selection rects (#117436) 2023-01-04 04:00:08 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments and library_annotations lints (#117365) 2022-12-20 16:03:21 -08:00
Casey Hillers
7673108d7e
Revert "Speed up first asset load by encoding asset manifest in binary rather than JSON (#113637)" (#116662)
This reverts commit 56cad89b1e8d79b75b88116a5db9cb70f91c4986.
2022-12-07 17:29:05 +00:00
Andrew Kolos
56cad89b1e
Speed up first asset load by encoding asset manifest in binary rather than JSON (#113637) 2022-12-05 10:39:10 -08:00
Bruno Leroux
073cefad02
[RawKeyboard] Fix Linux remapped CapsLock throws (#115009)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-11-21 19:43:55 +00:00
Maurice Parrish
95ace11afa
Include initial offset when using PlatformViewSurface (#114103)
* 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
2022-11-15 18:21:37 +00:00
Xilai Zhang
338841afd3
Revert "Revert "Revert "Scribble mixin (#104128)" (#114647)" (#114698)" (#115146)
This reverts commit 3cde69e8d9dff7e081cb6daa6cd633c49176cb32.
2022-11-11 10:01:11 -08:00
Bruno Leroux
5628ebf662
[RawKeyboard] Allow inconsistent modifiers for Web (#114499)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-11-07 20:41:09 +00:00
Justin McCandless
3cde69e8d9
Revert "Revert "Scribble mixin (#104128)" (#114647)" (#114698)
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.
2022-11-07 11:28:27 -08:00
Casey Hillers
009fa69f3c
Revert "Scribble mixin (#104128)" (#114647)
This reverts commit b571abfbfd17b9ab7bdf73ac9758bbd87264979a.
2022-11-03 17:17:30 -07:00
Alex Li
0f1d0e39e9
🎨 Improve exceptions thrown by asset bundle (#114313) 2022-11-01 05:33:33 +00:00
Justin McCandless
b571abfbfd
Scribble mixin (#104128)
Refactors methods related to the iPad Scribble feature out of TextInputClient
2022-10-24 12:46:43 -07:00
J-P Nurmi
28e0f089a2
Reland "[text_input] introduce TextInputControl" (#113758) 2022-10-24 07:23:32 -07:00
Zachary Anderson
9064bf674b
Revert "[text_input] introduce TextInputControl (#76072)" (#113724)
This reverts commit 2fdfa29e081bb368bf11b6177e4e9bb7c8ad4d34.
2022-10-19 15:00:00 -07:00
Justin McCandless
a832a72036
Handle privatecommand messages that pass no data (#112590)
Fixes an error in some text editors.
2022-10-19 10:30:23 -07:00
Renzo Olivares
300181b38c
Make TextEditingDelta diagnosticable and override debugFillProperties for concrete TextEditingDelta implementations (#113395) 2022-10-17 04:18:29 +00:00
stuartmorgan
5c381254e3
Wait for non-empty layout in platform view placeholder (#112402) 2022-10-05 12:58:20 +00:00
J-P Nurmi
2fdfa29e08
[text_input] introduce TextInputControl (#76072)
Allows the creation of virtual in-app keyboards written in Flutter.  Especially useful for embedded environments.
2022-10-04 15:23:12 -07:00
Tong Mu
31e2618b7a
[RawKeyboard] Allow inconsistent modifiers for iOS and Android (#108926) 2022-09-28 01:29:22 +00:00
chunhtai
50cd73775f
Expose text boundary combiner class (#112085) 2022-09-26 21:45:53 +00:00
stuartmorgan
bc994c7ffd
Allow Hybrid Composition fallback for Android platform views (#109161) 2022-09-21 15:57:11 +00:00
chunhtai
bcc1dc6b99
Makes TextBoundary and its subclasses public (#110367) 2022-09-16 22:05:04 +00:00
LongCatIsLooong
8caa14e629
Fix a type casting error in text_input.dart (#109635) 2022-08-17 01:26:21 +00:00
stuartmorgan
ab23233fa8
Reland: Fix Android platform view creation flow (#109405) 2022-08-12 01:26:19 +00:00
Casey Hillers
9ad052a57e
Revert "Fix Android platform view creation flow" (#109389)
Merging on red to green the build.
2022-08-11 08:05:27 -07:00
stuartmorgan
a47b3ccc2c
Fix Android platform view creation flow (#109232) 2022-08-11 02:26:30 +00:00
Michael Goderbauer
ed0c8d77f8
Remove some outdated ignores from framework (#108915) 2022-08-03 22:42:06 +00:00
Matej Knopp
7e8f0e57bf
[macOS] Use editing intents from engine (#105407) 2022-08-03 21:51:28 +02:00
Dan Field
0cc7db54ce
Guard against usage after async callbacks in RenderAndroidView, unregister listener (#108496) 2022-07-28 18:36:04 +00:00