Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 7-3-0 #180

Merged
merged 21 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ jobs:
- name: "EXAMPLE-1 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-1 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/basictheme-v7-2/" --release -t lib/example1_basic_theme_usage/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/basictheme-latest/" --release -t lib/example1_basic_theme_usage/main.dart
- name: "EXAMPLE-1 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/basictheme-v7-2'
destination_folder: 'flexcolorscheme/basictheme-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
Expand All @@ -84,14 +84,14 @@ jobs:
- name: "EXAMPLE-2 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-2 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/customtheme-v7-2/" --release -t lib/example2_custom_theme/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/customtheme-latest/" --release -t lib/example2_custom_theme/main.dart
- name: "EXAMPLE-2 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/customtheme-v7-2'
destination_folder: 'flexcolorscheme/customtheme-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
Expand All @@ -100,14 +100,14 @@ jobs:
- name: "EXAMPLE-3 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-3 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/fourthemes-v7-2/" --release -t lib/example3_four_themes/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/fourthemes-latest/" --release -t lib/example3_four_themes/main.dart
- name: "EXAMPLE-3 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/fourthemes-v7-2'
destination_folder: 'flexcolorscheme/fourthemes-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
Expand All @@ -116,14 +116,14 @@ jobs:
- name: "EXAMPLE-4 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-4 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/allthemes-v7-2/" --release -t lib/example4_all_themes/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/allthemes-latest/" --release -t lib/example4_all_themes/main.dart
- name: "EXAMPLE-4 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/allthemes-v7-2'
destination_folder: 'flexcolorscheme/allthemes-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
Expand All @@ -132,14 +132,14 @@ jobs:
- name: "EXAMPLE-5 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-5 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/themesplayground-v7-2/" --release -t lib/example5_themes_playground/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/themesplayground-latest/" --release -t lib/example5_themes_playground/main.dart
- name: "EXAMPLE-5 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/themesplayground-v7-2'
destination_folder: 'flexcolorscheme/themesplayground-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
4 changes: 2 additions & 2 deletions .github/workflows/deploy_playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ jobs:
- name: "EXAMPLE-5 START BUILD - Flutter clean before build"
run: flutter clean && cd example && flutter clean
- name: "EXAMPLE-5 WEB release build"
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/themesplayground-v7-2/" --release -t lib/example5_themes_playground/main.dart
run: cd example && flutter build web --web-renderer canvaskit --base-href "/flexcolorscheme/themesplayground-latest/" --release -t lib/example5_themes_playground/main.dart
- name: "EXAMPLE-5 DEPLOY to GitHub Pages repository, published on commit."
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: 'example/build/web/.'
destination_folder: 'flexcolorscheme/themesplayground-v7-2'
destination_folder: 'flexcolorscheme/themesplayground-latest'
destination_repo: 'rydmike/rydmike.github.io'
user_email: 'm.rydstrom@gmail.com'
user_name: 'rydmike'
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,71 @@

All changes to the **FlexColorScheme** (FCS) package are documented here.

## 7.3.0

**August 16, 2023**

This release uses new features in Material-3 theming that are only available in Flutter 3.13 or later. It thus **requires** minimum **Flutter 3.13.0**.

In the next Flutter stable release after 3.13, Flutter will change the `ThemeData.useMaterial3` default from `false` to true. In other words, applications using FCS will get the Material-3 colors, text styles, and other visuals, by default. The `FlexColorScheme` API will then be following along with this breaking change. In this release the `FlexColorScheme` API `useMaterial3` still defaults to `false`. The **Themes Playground** app has for quite some time already defaulted to setting the value to `true`. Which is also already the case in Flutter when you create a new application with `flutter create`.

**PACKAGE**

**NEW**

* To `FlexSubThemes` in `buttonTheme` **added** bool `alignedDropdown`.
* To `FlexSubThemesData` **added** bool `alignedDropdown`. Setting it to true improves the style of the `DropdownButton` and the `DropdownButtonForField`. They no longer expand outside the width of the parent dropdown button but are kept size aligned with it.


* To `FlexSubThemes` in:
- `chipTheme` **added** TextStyle `secondaryLabelStyle`
- `dialogTheme` **added** TextStyle `titleTextStyle` and `contentTextStyle`
- `floatingActionButtonTheme` **added** TextStyle `extendedTextStyle`
- `menuButtonTheme` **added** TextStyle `textStyle`
- `snackBarTheme` **added** TextStyle `contentTextStyle`
- `timePickerTheme` **added** TextStyle `dayPeriodTextStyle`, `dialTextStyle`, `helpTextStyle` and `hourMinuteTextStyle`
- `toggleButtonsTheme` **added** TextStyle `textStyle`

* The `TextStyle` additions above, to mentioned `FlexSubThemes`, do not yet bring any new features usable via `FlexColorScheme` theming APIs. They are a preparation for adding more component `TextStyles` to `FlexSubThemesData`. This in turn, will enable more direct `TextStyle` theming via `FlexColorScheme` API without using `copyWith` to override produced `ThemeData`.


* As planned in previous versions, made the `FlexSubThemesData.useInputDecoratorThemeInDialogs` apply also to `DatePickerDialog` and not only to `TimePickerDialog`. This feature is not optimally supported by the framework. The current implementation has severe limitations. See more info in [PR #128950 comment](https://github.com/flutter/flutter/pull/128950#issuecomment-1657177393). For more information about the differences in how `InputDecorationTheme` behaves in different component themes, read the proposal **"Make InputDecorationTheme usage in components consistent"** in [issue #131666](https://github.com/flutter/flutter/issues/131666).

**CHANGE**

* **Minor style breaking changes:**

- `FlexSubThemes.dropdownMenuTextStyle` now default to `TextTheme.bodyLarge` if not defined. Previously it used Flutter SDK default `TextTheme.bodyLarge`, which is a poor design default as the style does not fit with default style `bodyLarge` used as default style in `TextField`in M3 mode. See [issue #131350](https://github.com/flutter/flutter/issues/131350) that contains a mention of this style deviant. In Jetpack compose, the `DropdownMenu` and its `TextField` part correctly defaults to using `bodyLarge`, this is thus assumed to be the correct spec wise. The issue of wrong default text styles in Flutter menus is further discussed in [issue #131676](https://github.com/flutter/flutter/issues/131676). FlexColorScheme will not internally correct the wrong default `TextStyle` on menu items, it will however change to follow the default when Flutter stable does. The difference in the `DropdownMenu` text input field was however significant enough to warrant a change already before the fix lands in Flutter stable.

**FIX**

* Fixed the `FlexSubThemes.checkboxTheme` that broke due to an unexpected breaking change in Flutter 3.13 caused by PR [#125643](https://github.com/flutter/flutter/pull/125643). The breaking change is discussed further in [issue #130295](https://github.com/flutter/flutter/issues/130295). The fix to the checkbox theme incorporates the new behavior to keep its custom styling working as before and expected.

* Fixed `useInputDecoratorThemeInDialogs` not working for some properties in the `InputDecorator`, when the value was null or `false`, where some properties in the `TextField`s in the `TimePickerDialog` did not revert back to default styles. Now they do, but via hard defined values to mimic the default M3 style, as that is the only way to get back to it when a very custom `themeData.inputDecoratorTheme` is being used.

**THEMES PLAYGROUND**

**NEW**

* The **PopupMenu and Dropdowns** panel got a setting for older Material-2 based `DropdownButtonFormField` and `DropdownButton` to set the new alignment property, which is an ancient theming property in the old `ButtonThemeData` that was used by deprecated and removed Material Buttons, but the theme is still used by these buttons.

* On the TextField panel, added a feature to set the input decoration style back to FlexColorScheme's own defaults.

**CHANGE**

* Harmonized custom color activation settings on **Theme Colors** and **Seeded ColorScheme**.

* Removed old switch in custom colors in dark mode, that was used to enable using input scheme color as own seed colors in dark mode when using custom colors. For simplicity, the custom dark mode colors have been used directly as seed colors in a few releases in the Playground already. The control was an old left-over with no function anymore.

* The global themed input decorator usage is now on by default for `TimePickerdialog` and `DatePickerdialog`. This is the only style currently supported for `DatePickerDialog` in Flutter, so it makes sense to keep it on by default. Turning it OFF for now only removes the custom, input decorator style from the `TimePickerDialog`. Despite the new feature in Flutter SDK, it cannot be removed from the `DatePickerDialog`. This is discussed in [PR #128950 comment](https://github.com/flutter/flutter/pull/128950#issuecomment-1657177393). Additional info is also available in Flutter [issue #131666](https://github.com/flutter/flutter/issues/131666).

**FIX**

* Fixed the old default color info for the toggles Switch, Checkbox and Radio, that are shown when FlexColorScheme is disabled as default values in Material 2 dark mode. They have been updated in Flutter SDK to `ColorScheme.secondary` color and are no longer not the horrid dark mode teal color. This default color info, shown when FlexColorScheme is disabled in the **Themes Playground**, had not been updated for the dark M2 mode Switch, Checkbox and Radio colors.




## 7.2.0

**July 20, 2023**
Expand Down