1. 07 Nov, 2023 1 commit
    • Qun Cheng's avatar
      Adaptive `Switch` (#130425) · ed70f4e2
      Qun Cheng authored
      Currently, `Switch.factory` delegates to `CupertinoSwitch` when platform
      is iOS or macOS. This PR is to:
      * have the factory configure the Material `Switch` for the expected look
      and feel.
      * introduce `Adaptation` class to customize themes for the adaptive
      components.
      ed70f4e2
  2. 06 Nov, 2023 1 commit
  3. 26 Oct, 2023 1 commit
    • Greg Price's avatar
      Fix dislocated doc and comment on ThemeData localize cache (#137315) · 5b3293c5
      Greg Price authored
      This comment on _localizedThemeDataCacheSize was a bit garbled from getting split up, and the doc on _localizedThemeDataCache was missing from having been moved elsewhere.
      
      It looks like the dislocation happened in 8b86d238 (#116088), which was otherwise making unrelated changes, including a couple of lines near these.  Likely it was due to an error in resolving merge or rebase conflicts at some point while revising that PR.
      5b3293c5
  4. 11 Oct, 2023 1 commit
    • Kate Lovett's avatar
      Fix some deprecation details (#136385) · 156e3487
      Kate Lovett authored
      This fixes/notates a few deprecations from an audit for the next tech debt cycle.
      
      - ThemeData errorColor and backgroundColor are notated as deprecated in multiple places, but one usage had a different version tag. Updated to match the rest.
      - ThemeData.copyWith useMaterial3 was deprecated because it did not do what developers expected - it did not automatically reassign all of the color values and such. (confirmed with @HansMuller) I added a note so that when we later remove it we don't introduce a bug.
      - the describeEnum deprecation was tagged wrong, it was a very long PR so by the time it merged the version it was finally tagged with was much later. (https://github.com/flutter/flutter/pull/125016)
      156e3487
  5. 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
  6. 25 Aug, 2023 1 commit
  7. 02 Aug, 2023 1 commit
  8. 28 Jul, 2023 1 commit
  9. 20 Jul, 2023 1 commit
  10. 18 Jul, 2023 2 commits
  11. 13 Jul, 2023 1 commit
  12. 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
  13. 26 May, 2023 1 commit
  14. 19 May, 2023 1 commit
  15. 18 May, 2023 1 commit
  16. 17 May, 2023 1 commit
  17. 28 Apr, 2023 1 commit
  18. 07 Apr, 2023 1 commit
  19. 28 Mar, 2023 1 commit
  20. 22 Mar, 2023 1 commit
  21. 16 Mar, 2023 1 commit
  22. 13 Mar, 2023 1 commit
  23. 22 Feb, 2023 1 commit
    • Mushaheed Syed's avatar
      Add ActionButtonIconsData for overriding action icons (#118229) · 7d85a585
      Mushaheed Syed authored
      * Add ActionButtonIconsData for overriding action icons
      
      * Fix formatting issues
      
      * Add missing exports in material library and add copyWith method in ActionButtonIconsData
      
      * Move all action buttons, and icons to action_buttons.dart
      
      * Rename actionButtonIcons to actionIconTheme
      
      * Refactor buttons in action_buttons.dart to extend a private class for common implementation
      
      * Refactor icons in action_buttons
      
      * Fix docs in action_buttons_theme
      
      * Fix #107646 always use 'Icons.arrow_back' as a back_button icon in web
      
      * Update documentation for action buttons and add style parameter to every action button
      
      * Fix analyzer warnings
      
      * Add missing style argument in IconButton of _ActionButton
      
      * Add tests for action buttons, action icon theme, drawer buttons, and back buttons
      
      * Add example (+test) for action icon button's action icon theme in examples/api
      
      * Fix analysis errors
      
      * Add missing license header in action_icon_theme.0.dart
      
      * Fix deprecation notice in theme_data.dart
      
      * Update theme data tests for actionIconTheme
      
      * Remove iconSize parameter from ActionButtons and update docs
      
      * Fix failing tests
      
      * Update button color during backbutton tests to red
      
      * Fix analytics issues
      
      * Fix format
      7d85a585
  24. 18 Feb, 2023 1 commit
  25. 17 Feb, 2023 1 commit
  26. 16 Feb, 2023 1 commit
  27. 13 Feb, 2023 1 commit
  28. 07 Feb, 2023 2 commits
  29. 02 Feb, 2023 1 commit
  30. 31 Jan, 2023 1 commit
  31. 25 Jan, 2023 2 commits
  32. 24 Jan, 2023 2 commits
  33. 17 Jan, 2023 1 commit
  34. 03 Jan, 2023 1 commit
  35. 06 Dec, 2022 1 commit
  36. 30 Nov, 2022 1 commit
    • Eilidh Southren's avatar
      M3 snackbar [re-land] (#116218) · 29422d25
      Eilidh Southren authored
      * Add M2 defaults and template skeleton
      
      * add MaterialStateColor functionality to ActionTextColor (issue #110402)
      
      * Add M2 defaults and template skeleton
      
      * updated material 3 tokens
      
      * Updated snackbar demo
      
      * add theme tests
      
      * add gen defaults
      
      * formatting
      
      * more whitespace fixes
      
      * add widget type
      
      * update docs
      
      * code review changes
      
      * Add line overflow functionality
      
      * whitespace fixes
      
      * update M3 animation
      
      * whitespace fixes
      
      * add insetPadding param
      
      * Modifed icon parameter to showCloseIcon
      
      * white space fixes
      
      * test fixes
      
      * rename iconColor to closeIconColor
      
      * debug test fix
      
      * de-britishification
      
      * g3fix
      
      * g3fix
      
      * debug test fix
      29422d25