1. 06 Feb, 2024 1 commit
    • Renzo Olivares's avatar
      TextField context menu should fade on scroll on mobile devices (#138313) · 0903bf70
      Renzo Olivares authored
      This change affects Android and iOS devices using the TextField's context menu. After this change the context menu will fade out when scrolling the text and fade in when the scroll ends. 
      
      If the scroll ends and the selection is outside of the view, then the toolbar will be scheduled to show in a future scroll end. This toolbar scheduling can be invalidated if the `TextEditingValue` changed anytime between the scheduling and when the toolbar is ready to be shown.
      
      This change also fixes a regression where the TextField context menu would not fade when the selection handles where not visible.
      
      When using the native browser context menu this behavior is not controlled by Flutter.
      
      https://github.com/flutter/flutter/assets/948037/3f46bcbb-ba6f-456c-8473-e42919b9d572
      
      Fixes #52425
      Fixes #105804
      Fixes #52426
      0903bf70
  2. 29 Jan, 2024 1 commit
  3. 19 Jan, 2024 1 commit
  4. 18 Jan, 2024 1 commit
  5. 11 Dec, 2023 1 commit
  6. 29 Nov, 2023 1 commit
  7. 28 Nov, 2023 1 commit
  8. 09 Nov, 2023 1 commit
    • Renzo Olivares's avatar
      Fix text selection in `SearchAnchor/SearchBar` (#137636) · 3225aa58
      Renzo Olivares authored
      This changes fixes text selection gestures on the search field when using `SearchAnchor`.
      
      Before this change text selection gestures did not work due to an `IgnorePointer` in the widget tree.
      
      This change:
      * Removes the `IgnorePointer` so the underlying `TextField` can receive pointer events.
      * Introduces `TextField.onTapAlwaysCalled` and `TextSelectionGestureDetector.onUserTapAlwaysCalled`, so a user provided on tap callback can be called on consecutive taps. This is so that the user provided on tap callback for `SearchAnchor/SearchBar` that was previously only handled by `InkWell` will still work if a tap occurs in the `TextField`s hit box. The `TextField`s default behavior is maintained outside of the context of `SearchAnchor/SearchBar`.
      
      Fixes https://github.com/flutter/flutter/issues/128332 and #134965
      3225aa58
  9. 24 Oct, 2023 1 commit
  10. 28 Sep, 2023 1 commit
  11. 20 Sep, 2023 1 commit
    • Greg Spencer's avatar
      Remove 'must be non-null' and 'must not be null' comments from material. (#134991) · a1e49be2
      Greg Spencer authored
      ## Description
      
      This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.
      
      This PR removes them from the material library.
      
      This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.
      
      In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.
      
      This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).
      
      ## Related PRs
      - https://github.com/flutter/flutter/pull/134984
      - https://github.com/flutter/flutter/pull/134992
      - https://github.com/flutter/flutter/pull/134993
      - https://github.com/flutter/flutter/pull/134994
      
      ## Tests
       - Documentation only change.
      a1e49be2
  12. 08 Sep, 2023 1 commit
  13. 10 Aug, 2023 1 commit
  14. 08 Aug, 2023 1 commit
  15. 02 Aug, 2023 1 commit
  16. 18 Jul, 2023 1 commit
  17. 13 Jul, 2023 1 commit
  18. 12 Jul, 2023 1 commit
  19. 09 Jun, 2023 1 commit
    • Pierre-Louis's avatar
      Improve defaults generation with logging, stats, and token validation (#128244) · 66cda591
      Pierre-Louis authored
      ## Description
      
      This improves defaults generation with logging, stats, and token validation. 
      
      This PR includes these changes:
      * introduce `TokenLogger`, with a verbose mode
        * prints versions and tokens usage to the console
        * outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google
      * find token files in `data` automatically
      * hide tokens `Map`
        * tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`.
        * tokens can be checked for existence with `tokenAvailable`
      * remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version
      * improve documentation
      
      ## Related Issues
       - Fixes https://github.com/flutter/flutter/issues/122602
      
      ## Tests
       - Added tests for `TokenLogger`
       - Regenerated tokens, no-op except version removal
      
      ## Future work
      A future PR should replace or remove the following invalid tokens usages
      
      <img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00">
      66cda591
  20. 16 May, 2023 1 commit
  21. 15 May, 2023 1 commit
  22. 25 Apr, 2023 1 commit
  23. 20 Apr, 2023 1 commit
  24. 18 Apr, 2023 1 commit
  25. 31 Mar, 2023 1 commit
  26. 29 Mar, 2023 1 commit
  27. 23 Mar, 2023 1 commit
  28. 22 Mar, 2023 1 commit
  29. 17 Mar, 2023 1 commit
  30. 13 Mar, 2023 1 commit
  31. 09 Mar, 2023 1 commit
  32. 08 Mar, 2023 1 commit
  33. 01 Mar, 2023 1 commit
  34. 07 Feb, 2023 1 commit
  35. 31 Jan, 2023 1 commit
    • Tanay Neotia's avatar
      Add support for image insertion on Android (#110052) · 0e22aca7
      Tanay Neotia authored
      * 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
      0e22aca7
  36. 27 Jan, 2023 1 commit
  37. 24 Jan, 2023 1 commit
  38. 17 Jan, 2023 1 commit
  39. 04 Jan, 2023 1 commit
  40. 03 Jan, 2023 1 commit