1. 06 Sep, 2023 1 commit
    • Burak İmdat's avatar
      Fix `subtitleTextStyle.color` isn't applied to the `ListTile.subtitle` in Material 2 (#133422) · cd9a257d
      Burak İmdat authored
      The difference between header text style and subtitle text style and the reason why it doesn't work is the code difference below. If we make the subtitle text style the same as the title text style it will work
      
      <details>
        <summary>Title Text Style</summary>
        
        ###  All Code
        
        ```dart
        TextStyle titleStyle = titleTextStyle
            ?? tileTheme.titleTextStyle
            ?? defaults.titleTextStyle!;
          final Color? titleColor = effectiveColor;
          titleStyle = titleStyle.copyWith(
            color: titleColor,
            fontSize: _isDenseLayout(theme, tileTheme) ? 13.0 : null,
          );
          final Widget titleText = AnimatedDefaultTextStyle(
            style: titleStyle,
            duration: kThemeChangeDuration,
            child: title ?? const SizedBox(),
          );
        ```
        
        ## Different Code Section
        
        ```dart
        final Color? titleColor = effectiveColor;
        ```
      </details>
      
      <details>
        <summary>Subtitle Text Style</summary>
        
        ## All Code
        
        ```dart
        subtitleStyle = subtitleTextStyle
              ?? tileTheme.subtitleTextStyle
              ?? defaults.subtitleTextStyle!;
            final Color? subtitleColor = effectiveColor
              ?? (theme.useMaterial3 ? null : theme.textTheme.bodySmall!.color);
            subtitleStyle = subtitleStyle.copyWith(
              color: subtitleColor,
              fontSize: _isDenseLayout(theme, tileTheme) ? 12.0 : null,
            );
            subtitleText = AnimatedDefaultTextStyle(
              style: subtitleStyle,
              duration: kThemeChangeDuration,
              child: subtitle!,
            );
        ```
        
        ## Different Code Section
        
        ```dart
        final Color? subtitleColor = effectiveColor
              ?? (theme.useMaterial3 ? null : theme.textTheme.bodySmall!.color);
        ```
      
      ### Description for code 
      - The value `theme.textTheme.bodySmall!.color` is given because the `effectiveColor` value is `null` and the `theme.useMaterial3` value is `false`
      </details>
      
      <details>
        <summary>Problem solved code</summary>
        
        ## All Code
        
        ```dart
        subtitleStyle = subtitleTextStyle
              ?? tileTheme.subtitleTextStyle
              ?? defaults.subtitleTextStyle!;
            final Color? subtitleColor = effectiveColor;
            subtitleStyle = subtitleStyle.copyWith(
              color: subtitleColor,
              fontSize: _isDenseLayout(theme, tileTheme) ? 12.0 : null,
            );
            subtitleText = AnimatedDefaultTextStyle(
              style: subtitleStyle,
              duration: kThemeChangeDuration,
              child: subtitle!,
            );
        ```
      </details>
      
      <details>
      <summary>Screenshot of the result after making the necessary change</summary>
      <img src="https://github.com/flutter/flutter/assets/70351342/b552fd4c-fdcd-4bf5-b4ba-d6b2cfe527cc" width=250>
      </details>
      
      #133412
      
      *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
      cd9a257d
  2. 12 Jun, 2023 1 commit
  3. 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
  4. 01 Jun, 2023 1 commit
  5. 16 May, 2023 1 commit
    • Ian Hickson's avatar
      Make SlottedMultiChildRenderObjectWidgetMixin a concrete class (#126108) · 027bb844
      Ian Hickson authored
      This is a proof of concept for renaming SlottedMultiChildRenderObjectWidgetMixin to SlottedMultiChildRenderObjectWidget and making it a concrete class.
      
      I also made SlottedContainerRenderObjectMixin generic instead of being specialized to RenderBox.
      
      I don't think this is something we can easily automigrate, but we may not need to, I don't know how common this is...
      027bb844
  6. 13 Mar, 2023 1 commit
  7. 17 Feb, 2023 1 commit
  8. 13 Feb, 2023 1 commit
  9. 09 Feb, 2023 1 commit
  10. 07 Feb, 2023 1 commit
  11. 06 Feb, 2023 1 commit
  12. 02 Feb, 2023 1 commit
  13. 25 Jan, 2023 1 commit
  14. 24 Jan, 2023 1 commit
  15. 19 Jan, 2023 1 commit
  16. 17 Jan, 2023 1 commit
  17. 09 Jan, 2023 1 commit
  18. 29 Dec, 2022 1 commit
  19. 20 Dec, 2022 1 commit
  20. 14 Dec, 2022 1 commit
  21. 12 Dec, 2022 1 commit
  22. 09 Dec, 2022 1 commit
  23. 29 Nov, 2022 1 commit
  24. 03 Oct, 2022 1 commit
  25. 30 Sep, 2022 1 commit
  26. 12 Sep, 2022 1 commit
  27. 05 Sep, 2022 1 commit
  28. 31 Aug, 2022 1 commit
  29. 22 Aug, 2022 1 commit
  30. 10 Aug, 2022 1 commit
  31. 13 Jul, 2022 2 commits
  32. 08 Jun, 2022 1 commit
  33. 25 May, 2022 2 commits
  34. 27 Apr, 2022 1 commit
  35. 19 Apr, 2022 1 commit
  36. 18 Apr, 2022 1 commit
  37. 14 Apr, 2022 1 commit
  38. 07 Apr, 2022 1 commit