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. 31 Jan, 2024 1 commit
  3. 30 Jan, 2024 1 commit
    • Renzo Olivares's avatar
      Fix: selection handles do not inherit color from local `Theme` widget (#142476) · 1daac1b8
      Renzo Olivares authored
      This change uses `CapturedTheme`s to capture the themes from the context the selection handles were built in and wraps the handles with them so they can correctly inherit `Theme`s from local `Theme` widgets.
      
      `CapturedTheme`s only captures `InheritedTheme`s, so this change also makes `_InheritedCupertinoTheme` an `InheritedTheme`. This is so we can capture themes declared under a `CupertinoTheme`, for example `primaryColor` is used as the selection handle color.
      
      Fixes #74890
      1daac1b8
  4. 24 Jan, 2024 1 commit
  5. 22 Jan, 2024 1 commit
    • Hassan Toor's avatar
      [web] - Fix broken `TextField` in semantics mode when it's a sibling of `Navigator` (#138446) · 59e892d3
      Hassan Toor authored
      When a `TextField` is rendered before a `Navigator`, it breaks in semantics mode.  This is because the framework generates the incorrect semantics tree (excludes the TextField) and when that tree gets sent to the engine, we don't get the signal to create the corresponding `<input>` element.
      
      This happens for a few reasons:
      * `ModalBarrier` uses `BlockSemantics` to drop the semantics of routes beneath the current route in `Navigator`
      * `ModalBarrier` mistakenly recognizes the widget outside of the `Navigator` to be its sibling
      *  So we end up dropping the semantics node of the `TextField` rendered before it. 
      
      The fix is to let `Navigator` generate a semantics node so that `ModalBarrier` doesn't mistakenly think widgets outside of `Navigator` are its siblings.  
      
      `Navigator` doesn't currently do this, which causes all the nodes generated from its widget subtree to be directly attached to the parent semantics node above `Navigator` - since this is also the parent of `TextField`, it considers them siblings. 
      
      Fixes https://github.com/flutter/flutter/issues/129324
      59e892d3
  6. 16 Jan, 2024 1 commit
  7. 12 Jan, 2024 1 commit
  8. 10 Jan, 2024 1 commit
  9. 03 Jan, 2024 1 commit
  10. 27 Dec, 2023 1 commit
  11. 21 Dec, 2023 1 commit
  12. 20 Dec, 2023 1 commit
  13. 15 Dec, 2023 2 commits
  14. 11 Dec, 2023 1 commit
  15. 08 Dec, 2023 1 commit
    • Bruno Leroux's avatar
      Add 'Share' button to the selection toolbar on Android (#139479) · e070417a
      Bruno Leroux authored
      ## Description
      
      This PR adds the 'Share' button to the text selection toolbar on Android.
      
      ## Related Issue
      
      Fixes https://github.com/flutter/flutter/issues/138728
      
      ## Tests
      
      Refactor a lot of existing tests in order to:
      - make them more readable (avoid duplication by introducing helper functions, specify explictly check which buttons are expected).
      - make them more accurate (check that expected buttons are visible instead of just checking the number of buttons).
      
      For instance, previous tests contained sections such as:
      
      ```dart
      
            // Collapsed toolbar shows 3 buttons.
            expect(
              find.byType(CupertinoButton),
              isContextMenuProvidedByPlatform ? findsNothing : isTargetPlatformIOS ? findsNWidgets(6) : findsNWidgets(3)
            );
      
      ```
      
      Where the comment is obsolete, the two cases (6 widgets and 3 widgets) are not explicit (which buttons are expected?), and not accurate (will pass if the number of buttons is right but the buttons are the wrong ones).
      e070417a
  16. 15 Nov, 2023 1 commit
  17. 11 Oct, 2023 1 commit
  18. 02 Oct, 2023 2 commits
  19. 22 Sep, 2023 1 commit
  20. 13 Sep, 2023 1 commit
  21. 08 Sep, 2023 1 commit
  22. 17 Aug, 2023 1 commit
  23. 16 Aug, 2023 1 commit
  24. 08 Aug, 2023 1 commit
  25. 07 Aug, 2023 1 commit
  26. 02 Aug, 2023 1 commit
  27. 06 Jul, 2023 1 commit
  28. 27 Jun, 2023 1 commit
  29. 15 May, 2023 1 commit
  30. 12 May, 2023 1 commit
  31. 24 Apr, 2023 1 commit
  32. 21 Apr, 2023 2 commits
  33. 20 Apr, 2023 2 commits
  34. 07 Apr, 2023 1 commit
  35. 05 Apr, 2023 1 commit
  36. 29 Mar, 2023 1 commit