diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index dd7651e..28c9f2c 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -27,7 +27,7 @@ on:
paths-ignore:
- "**.md"
release:
- branches: [master]
+ branches: [none]
types: [published]
jobs:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bdeaac6..7e2f77b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to the **FlexSeedScheme** (FSS) package are documented here.
+## 3.1.1-dev.1
+
+**July 12, 2024**
+
+**CHORE**
+
+* Experiment to find and remove references from the package to deprecated properties for scoring purposes. The deprecated colors are **NOT** used anymore, but pub's pana analyzer still complains. It happily ignores the "allow usage of self-deprecated members" setting. It also complains about references used in doc comments. This is the first attempt to find and fixe all things it complains about.
+
## 3.1.0
**July 12, 2024**
diff --git a/README.md b/README.md
index 29f439d..bcf4947 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,7 @@
# FlexSeedScheme (FSS)
-A more flexible and powerful version of Flutter's `ColorScheme.fromSeed`.
-Use this package instead of `ColorScheme.fromSeed` and get around its limitations. The replacement `SeedColorScheme.fromSeeds` has the following additional capabilities:
+A more flexible and powerful version of Flutter's `ColorScheme.fromSeed`. Use this package instead of `ColorScheme.fromSeed` and get around its limitations. The replacement `SeedColorScheme.fromSeeds` has the following additional capabilities:
* Optionally use separate seed key colors for all palettes the `ColorScheme` is based on, to customize the seed-based tonal palettes for primary, secondary, tertiary as well as error, neutral and neutral variant colors used by the `ColorScheme`.
* Change and customize the chromacity (colorfulness) used in the seed strategy for tonal palette generation in the Google HCT (Hue-Chroma-Tone) color space.
@@ -11,9 +10,6 @@ Use this package instead of `ColorScheme.fromSeed` and get around its limitation
* Remove color tint from all surface colors and make them monochrome.
* Use the new Material-3 design `ColorScheme` variants like `fidelity`, `content` and `monochrome` that arrived in Flutter SDK v3.22.2, with the twist that you can now also use multiple seed colors with them.
-> [!NOTE]
-> FlexSeedScheme still produces color values for the in Flutter 3.22 deprecated `ColorScheme` colors `background`, `onBackground` and `surfaceVariant`. It does so because despite the colors being deprecated, they are still used in `ThemeData` creation and in a few widgets by the Flutter SDK in both stable 3.22 and also in master 3.23. The colors are not used in the official Material-3 design, but are still used in the Flutter SDK. Since FSS references these deprecated colors, that it has to do to produce a correct and functional `ColorScheme`, it loses 10 score points in **pub.dev** pana analyzer. However, without doing this the `ColorScheme` produced by FSS would not be fully functional and correct for the Flutter SDK. So it is better to lose 10 points than to not work correctly. Whenever Flutter fully stops using these deprecated colors, FSS will be updated to reflect this and no longer reference them.
-
## Getting Started
Add the `flex_seed_scheme` package to `pubspec.yaml`:
@@ -41,17 +37,16 @@ const Color secondarySeedColor = Color(0xFF3871BB);
const Color tertiarySeedColor = Color(0xFF6CA450);
```
-With **FlexSeedScheme** you make a seed generated `ColorScheme` using `SeedColorScheme.fromSeeds`. It works like `ColorScheme.fromSeed`, but instead of only accepting a single seed color, it can use six key colors as seed colors. One for each main color (primary, secondary and tertiary) group in `ColorScheme`. You can even customize the seed generated `error` color, typically there is no need to do so, but if your primary color is of a red hue, that conflicts with the error color, then adjusting the error color is a possibility. You can also use custom key colors to seed generate the neutral and neutral variant palettes, that are used to define all the surface and background colors in `ColorScheme`. We recommend sticking to the default that uses primary key color's hue with very low chroma.
+With **FlexSeedScheme** you make a seed generated `ColorScheme` using `SeedColorScheme.fromSeeds`. It works like `ColorScheme.fromSeed`, but instead of only accepting a single seed color, it can use **six key color**s as seed colors. One for each main color (primary, secondary and tertiary) group in `ColorScheme`.
+
+You can even customize the seed generated `error` color, typically there is no need to do so, but if your primary color is of a red hue, that conflicts with the error color, then adjusting the error color is a possibility.
+
+You can also use custom key colors to seed generate the neutral and neutral variant palettes, that are used to define all the surface and background colors in `ColorScheme`. We recommend sticking to the default that uses primary key color's hue with very low chroma.
Chroma limits that differ from Material-3 defaults for tonal palette generation, can also be
-defined. Additionally, tone mapping, that defines which tone is used by what `ColorScheme` color,
-can be customized. Both are done via `FlexTones` passed in to `tones`.
+defined. Additionally, tone mapping, that defines which tone is used by a `ColorScheme` color, can be customized. Both are done via `FlexTones` passed in to `tones`.
-Typically, you would use the same key colors and tones setup to produce the `ColorScheme` for
-light and dark theme mode. This guarantees that the light and dark theme use identical generated
-tonal palettes, and only vary based on which tones are used for what color in light and dark mode.
-This results in matching light and dark theme colors. This is just the norm though, feel free
-to experiment.
+Typically, you would use the same key colors and tones setup to produce the `ColorScheme` for light and dark theme mode. This guarantees that the light and dark theme use identical generated tonal palettes, and only vary based on which tones are used for what color in light and dark mode. This results in matching light and dark theme colors. This is just the norm though, feel free to experiment.
```dart
// Make a light ColorScheme from the seeds.
@@ -79,22 +74,13 @@ to experiment.
### Separate Key Colors to Seed Each Main Color Group
-You can use separate key colors as seeds to generate the primary, secondary and tertiary tonal
-palettes. If no key color for `secondaryKey` and/or `tertiaryKey` are provided, they use
-`primaryKey` color as their seed color value.
+You can use separate key colors as seeds to generate the primary, secondary and tertiary tonal palettes. If no key color for `secondaryKey` and/or `tertiaryKey` are provided, they use `primaryKey` color as their seed color value.
-If you only specify `primaryKey` color as seed, and no custom `tones` configuration, an identical
-`ColorScheme` to `ColorScheme.fromSeed` is produced.
+If you only specify `primaryKey` color as seed, and no custom `tones` configuration, an identical `ColorScheme` to `ColorScheme.fromSeed` is produced.
-The default chroma limits in the HCT color space used for seed generated colors for secondary and
-tertiary colors in `ColorScheme.fromSeed` have quite low chroma values. This makes the colors
-muted or pastel like. This is most obvious with secondary colors. This is by design
-in the standard Material-3 color palette. You can tune this behavior by passing in a custom
-`FlexTones` configuration to `tones`. There are pre-made configurations you can use, above
-`FlexTones.vivid` was used. It is also easy to make custom configurations. Look in source code for `FlexTones` and use the pre-made definitions as inspiration for your own configs.
+The default chroma limits in the HCT color space used for seed generated colors for secondary and tertiary colors in `ColorScheme.fromSeed` have quite low chroma values. This makes the colors muted or pastel like. This is most obvious with secondary colors. This is by design in the standard Material-3 color palette. You can tune this behavior by passing in a custom `FlexTones` configuration to `tones`. There are pre-made configurations you can use, above `FlexTones.vivid` was used. It is also easy to make custom configurations. Look in source code for `FlexTones` and use the pre-made definitions as inspiration for your own configs.
-Using the above configuration, the following core palettes are generated, in order from top to
-bottom:
+Using the above configuration, the following core palettes are generated, in order from top to bottom:
* Primary tonal palette
* Secondary tonal palette
@@ -105,10 +91,7 @@ bottom:
-The color tones in the above palettes are then mapped to `ColorScheme` colors. Mapping is
-different for light and dark theme mode to create a color scheme with suitable contrast.
-With the example `FlexTones.vivid` setup used in `tones`, the light `ColorScheme` is mapped as
-shown below:
+The color tones in the above palettes are then mapped to `ColorScheme` colors. Mapping is different for light and dark theme mode to create a color scheme with suitable contrast. With the example `FlexTones.vivid` setup used in `tones`, the light `ColorScheme` is mapped as shown below:
@@ -116,10 +99,7 @@ And the dark `ColorScheme` becomes:
-We can, for example, see that in light mode, the primary tone 30, is assigned to `ColorScheme.primary`
-color and tone 90 to `primaryContainer`. In dark mode they get tones 80 and 20. Similar assignments
-are repeated for secondary, tertiary, error colors and all the surface and background colors.
-It is this mapping that `FlexTones` gives you control over.
+We can, for example, see that in light mode, the primary tone 30, is assigned to `ColorScheme.primary` color and tone 90 to `primaryContainer`. In dark mode they get tones 80 and 20. Similar assignments are repeated for secondary, tertiary, error colors and all the surface and background colors. It is this mapping that `FlexTones` gives you control over.
### Dynamic Scheme Variants
@@ -193,27 +173,13 @@ color used as `primaryKey` to `primary` color as well.
);
```
-This strategy works well for the light mode `ColorScheme`, since the prominent brand color a company
-has defined is typically intended to be printed on white paper. If you have secondary brand colors
-that are to be used, using them as seeds for `secondaryKey` and `tertiaryKey` will work too.
-How well they will fit and match the Material 3 color system, if assigned to
-`secondary` and `tertiary` directly as colors in `SeedColorScheme.fromSeeds`, will vary depending
-on what colors they are.
+This strategy works well for the light mode `ColorScheme`, since the prominent brand color a company has defined is typically intended to be printed on white paper. If you have secondary brand colors that are to be used, using them as seeds for `secondaryKey` and `tertiaryKey` will work too. How well they will fit and match the Material 3 color system, if assigned to `secondary` and `tertiary` directly as colors in `SeedColorScheme.fromSeeds`, will vary depending on what colors they are.
-If your brand color(s) for light mode are light, so that they require dark text for good contrast,
-instead of light or white text, you will also have to override the contrast colors for them if you
-overrode them by giving the seed colors to `primary`, `secondary` and `tertairy`. You then have to
-manually also assign suitable contrast colors to `onPrimary`, `onSecondary` and `onTertairy`.
+If your brand color(s) for light mode are light, so that they require dark text for good contrast, instead of light or white text, you will also have to override the contrast colors for them if you overrode them by giving the seed colors to `primary`, `secondary` and `tertairy`. You then have to manually also assign suitable contrast colors to `onPrimary`, `onSecondary` and `onTertairy`.
-Companies rarely have brand colors suited for good contrast in dark theme mode. In that case
-prefer only using the same light mode brand colors as key colors to seed the dark mode
-`ColorScheme`. If they do have dark mode specifications, and the colors are of same hue as
-light mode, consider still using the light mode colors as the seed source, and only applying the
-appropriate dark mode colors to `primary`, `secondary` and `tertiary` as needed.
+Companies rarely have brand colors suited for good contrast in dark theme mode. In that case prefer only using the same light mode brand colors as key colors to seed the dark mode `ColorScheme`. If they do have dark mode specifications, and the colors are of same hue as light mode, consider still using the light mode colors as the seed source, and only applying the appropriate dark mode colors to `primary`, `secondary` and `tertiary` as needed.
-If there is a spec that calls for completely different main colors in dark mode, with different
-hues, then seeding from them in dark mode and also setting `primary`, `secondary` and `tertiary` to these
-color values is appropriate.
+If there is a spec that calls for completely different main colors in dark mode, with different hues, then seeding from them in dark mode and also setting `primary`, `secondary` and `tertiary` to these color values is appropriate.
## ColorScheme Generation Strategy
@@ -227,14 +193,12 @@ In the above example, we used a predefined tone mapping and chroma setup `ColorS
* `FlexTones.highContrast`, can be used for more color-accessible themes.
* `FlexTones.ultraContrast`, for a very high-contrast theme version.
* `FlexTones.jolly`, for a more "jolly" and colorful theme.
-* `FlexTones.vividBackground`, like `vividSurfaces`, but tone mapping for `surface` and `background` are swapped.
+* `FlexTones.vividBackground`, like `vividSurfaces`, but with less tint in surface color and a slightly darker surface color than default in dark mode.
* `FlexTones.oneHue`, a balanced chromatic setup. It is called oneHue because When only primary color is used as seed, it does not rotate its hue value to make a computed hue for tertiary tonal palettes, but uses the same hue. This makes it possible to make seed-generated color schemes from a single color. In such themes, all colors are based on the same hue, but using different chroma and tones.
* `FlexTones.canyPop`, A high contrast color scheme, useful for accessible themes, with colors that pop like candy. Keeps the background and surface white in light mode, and only a slight tint in dark mode. Neutrals have very low chroma.
* `FlexTones.chroma`, use it to create a color scheme that follows chroma of each used seed color. Useful for manual control of pop or low chromacity. It uses low surface tint and neutrals with medium chroma.
-You can also define custom tones mapping and chroma limitation setups with `FlexTones`. Prefer using
-the `FlexTones.light` and `FlexTones.dark` constructors as base for custom definitions. By using
-them, you only need to override system defaults that you want to change.
+You can also define custom tones mapping and chroma limitation setups with `FlexTones`. Prefer using the `FlexTones.light` and `FlexTones.dark` constructors as base for custom definitions. By using them, you only need to override system defaults that you want to change.
```dart
// Example definition of light custom tones config.
@@ -287,13 +251,9 @@ When using the `FlexPaletteType.extended` type tones, there are not only new ton
## Accessibility
-You can use `FlexTones` to create a seed generated `ColorScheme`, that is based on same colors
-as the standard theme's light and dark scheme colors, but uses a chroma configuration and tone
-mapping setup that increases contrast further from standard light and dark theme setup.
+You can use `FlexTones` to create a seed generated `ColorScheme`, that is based on same colors as the standard theme's light and dark scheme colors, but uses a chroma configuration and tone mapping setup that increases contrast further from standard light and dark theme setup.
-There are two high contrast `FlexTones` configuration pre-made for this. They are called
-`FlexTones.highContrast`, a colorful high-contrast version, and `FlexTones.ultraContrast`, a less
-colorful version, a more dark on light in light theme mode, and light on dark in dark mode.
+There are two high contrast `FlexTones` configuration pre-made for this. They are called `FlexTones.highContrast`, a colorful high-contrast version, and `FlexTones.ultraContrast`, a less colorful version, a more dark on light in light theme mode, and light on dark in dark mode.
The `FlexTones.canyPop` also creates high contrast theme, with colors that are vibrant and pop, it can also be used for high contrast themes. Depending on seed color input values and its chroma value, `FlexTones.chroma` can also be very vibrant and high contrast. It can also be monochromatic, i.e., gray-scale if input seed colors have chroma value zero.
@@ -317,14 +277,7 @@ final ColorScheme schemeDarkHc = SeedColorScheme.fromSeeds(
);
```
-If you define equivalent `ThemeData` based on those schemes as your standard `MaterialApp`,
-`theme` and `darkTheme` definitions, but assign them to `highContrastTheme` and
-`highContrastDarkTheme`, you get more accessible themed colors that are based on the same colors
-but with higher contrast, that are activated when users select high-contrast theme in device
-accessibility system settings. Changing to accessibility theme based on device system setting
-automatically, by using theme data defined on `MaterialApp` properties `highContrastTheme` and
-`highContrastDarkTheme`, is only supported on **iOS** devices in the current version of Flutter SDK.
-For other platforms, you need to use a user setting and toggle themes based on it.
+If you define equivalent `ThemeData` based on those schemes as your standard `MaterialApp`, `theme` and `darkTheme` definitions, but assign them to `highContrastTheme` and `highContrastDarkTheme`, you get more accessible themed colors that are based on the same colors but with higher contrast, that are activated when users select high-contrast theme in device accessibility system settings. Changing to accessibility theme based on device system setting automatically, by using theme data defined on `MaterialApp` properties `highContrastTheme` and `highContrastDarkTheme`, is only supported on **iOS** devices in the current version of Flutter SDK. For other platforms, you need to use a user setting and toggle themes based on it.
```dart
// Define accessibility high contrast versions using same color base.
@@ -362,10 +315,7 @@ The contrast level provides a quick way to vary the contrast, but it can only be
### Black and White Contrast
-Another way to modify `FlexTones` configurations for contrast and accessibility, is by forcing all
-**main** contrasting on colors and all surfaces on colors to only use black and white contrasting colors.
-If we do not use the Material-3 guide's colored contrasting color mappings, we can improve
-color accessibility and contrast on any `FlexTones` configuration with a few simple modifiers
+Another way to modify `FlexTones` configurations for contrast and accessibility, is by forcing all **main** contrasting on colors and all surfaces on colors to only use black and white contrasting colors. If we do not use the Material-3 guide's colored contrasting color mappings, we can improve color accessibility and contrast on any `FlexTones` configuration with a few simple modifiers.
> [!NOTE]
> If you use the `variant` property to make your seed generated `ColorScheme`, you cannot use the below presented `tones` modifiers, as they are modifiers used on the input `FlexTones` configurations provided in `tones`. In the package main example app you can find a demonstration of how to use `tones` as input for `FlexTones` based variants, and `variant` being effective only when using variants that are Flutter SDK and MCU based.
@@ -396,8 +346,7 @@ The surface on colors made black or white by `onSurfacesUseBW()` are:
* `onInverseSurface`
* `onBackground` (deprecated in Flutter 3.22)
-Here is a usage example, using both these modifiers. You can use them individually
-too, and you don't have to use them in both light and dark mode.
+Here is a usage example, using both these modifiers. You can use them individually too, and you don't have to use them in both light and dark mode.
```dart
// Make a Material 3 seeded light ColorScheme,
@@ -430,20 +379,16 @@ final ColorScheme schemeDarkOnBW = SeedColorScheme.fromSeeds(
#### FlexTones Modifier `surfacesUseBW()`
-Another `FlexTones` modifier is `surfacesUseBW()`. This modifier will make the `surface` and
-`background` colors plain white in light mode and true black in dark mode.
+Another `FlexTones` modifier is `surfacesUseBW()`. This modifier will make the `surface` and `background` colors plain white in light mode and true black in dark mode.
The surface colors made black or white by `surfacesUseBW()` are:
+
* `surface`
* `background` (deprecated in Flutter 3.22)
-This modifier can be used for great effect in light mode, as you can remove the colored
-background surfaces from any of the `FlexTones` seeding strategies. Some designs may prefer
-plain white, for backgrounds in light mode, for a more platform-agnostic design.
+This modifier can be used for great effect in light mode, as you can remove the colored background surfaces from any of the `FlexTones` seeding strategies. Some designs may prefer plain white, for backgrounds in light mode, for a more platform-agnostic design.
-In dark mode `surfacesUseBW()` can be used create seeded color schemes with full black
-background and surface colors, but you may prefer to keep the primary seed color based
-slightly primary color tinted backgrounds in dark mode.
+In dark mode `surfacesUseBW()` can be used create seeded color schemes with full black background and surface colors, but you may prefer to keep the primary seed color based slightly primary color tinted backgrounds in dark mode.
This modifier will make the `surface` color and still also the deprecated `background` color plain white in light mode and full black in dark mode.
@@ -545,9 +490,7 @@ final ColorScheme schemeLightOnBW = SeedColorScheme.fromSeeds(
## [Example Application](https://rydmike.com/flexseedscheme/demo-v2)
-The included example application uses above color seeding and custom
-tone mapping. You can also choose any of the built-in pre-configured tone mappings as used
-seeding strategy. When you select seeding strategy, basic info about is displayed.
+The included example application uses above color seeding and custom tone mapping. You can also choose any of the built-in pre-configured tone mappings as used seeding strategy. When you select seeding strategy, basic info about is displayed.
You can try a web version of this example for version 3 of FSS [**here in V3 demo**](https://rydmike.com/flexseedscheme/demo-v3). The older demos for version 1 and 2 of FSS are still available [**here in V1 demo**](https://rydmike.com/flexseedscheme/demo-v1) and [**here in V2 demo**](https://rydmike.com/flexseedscheme/demo-v2)
@@ -676,7 +619,6 @@ As we can see, there is more pop and colorfulness in the **One hue** version. We
Now we see that the `DatePicker` no longer has the pink color it got from its default `tertiaryContainer` color. Instead, it uses the same blue hue related color as the `primary` color. This is because the `oneHue` strategy uses the same hue for all tonal palettes. This makes it possible to create a color scheme from a single color all based on the hue in the source brand color, without using tedious component color scheme re-mappings.
-
## Package Background
This package was extracted from the customizable color scheme seeding engine in the
@@ -686,8 +628,6 @@ This allows developers to use the same customizable `ColorScheme` seeding algori
**FlexColorScheme**, without using the FlexColorScheme package.
Starting with **FlexColorScheme** version 6 and later, FCS depends on this package instead.
-If you use **FlexColorScheme** version 6 or later, you do not need to add **FlexSeedScheme** to
-use its features, FlexColorScheme exports its API as well.
+If you use **FlexColorScheme** version 6 or later, you do not need to add **FlexSeedScheme** to use its features, FlexColorScheme exports its API as well.
-If you use FlexColorScheme, you typically do not even need to use FlexSeedScheme directly,
-its usage is baked in and used based on how you configure FlexColorScheme.
\ No newline at end of file
+If you use FlexColorScheme, you typically do not even need to use FlexSeedScheme directly, its usage is baked in and used based on how you configure FlexColorScheme.
\ No newline at end of file
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 331ca8e..bced436 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -59,7 +59,7 @@ analyzer:
# Allow self-reference to deprecated members. This is done because otherwise we have
# to annotate every member in every test, assert, etc. when we deprecate something.
- deprecated_member_use_from_same_package: ignore
+ # deprecated_member_use_from_same_package: ignore
# DON'T assign new values to parameters of methods or functions.
#
diff --git a/example/lib/core/constants/app_data.dart b/example/lib/core/constants/app_data.dart
index a53b9a7..3acc190 100644
--- a/example/lib/core/constants/app_data.dart
+++ b/example/lib/core/constants/app_data.dart
@@ -27,7 +27,7 @@ class AppData {
// build numbers.
static const String versionMajor = '3';
static const String versionMinor = '1';
- static const String versionPatch = '0';
+ static const String versionPatch = '1-dev.1';
static const String versionBuild = '01';
static const String version = '$versionMajor.$versionMinor.$versionPatch '
'Build-$versionBuild';
diff --git a/example/pubspec.lock b/example/pubspec.lock
index cb29f14..f77a277 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -71,7 +71,7 @@ packages:
path: ".."
relative: true
source: path
- version: "3.1.0"
+ version: "3.1.1-dev.1"
flutter:
dependency: "direct main"
description: flutter
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 6018c85..992ea03 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -1,6 +1,6 @@
name: flex_seed_scheme_example
description: Example that demonstrate how to use the FlexSeedScheme package.
-version: 3.1.0
+version: 3.1.1-dev.1
publish_to: 'none'
environment:
sdk: '>=3.0.0 <4.0.0'
diff --git a/lib/src/flex/flex_seed_scheme.dart b/lib/src/flex/flex_seed_scheme.dart
index 8ebc56f..e595625 100644
--- a/lib/src/flex/flex_seed_scheme.dart
+++ b/lib/src/flex/flex_seed_scheme.dart
@@ -22,8 +22,7 @@ import 'flex_tones.dart';
/// This class is the same concept as Flutter's [ColorScheme] class.
///
/// It is used used to generate a [ColorScheme] based on a modified version of
-/// [CorePalette] found in package material_color_utilities. It is a rewrite
-/// of [Scheme] found in same "material_color_utilities" package.
+/// [CorePalette] found in package material_color_utilities.
///
/// It has two enhancements to makes it more flexible and powerful:
///
@@ -189,7 +188,7 @@ class FlexSeedScheme {
/// A color that's clearly legible when drawn on [surface].
final int onSurface;
- /// A color that's clearly legible when drawn on [surfaceVariant].
+ /// A alternative color that's clearly legible when drawn on [surface] colors.
final int onSurfaceVariant;
/// A utility color that creates boundaries and emphasis to improve usability.
@@ -223,16 +222,16 @@ class FlexSeedScheme {
/// A color that typically appears behind scrollable content.
@Deprecated('Use surface instead.')
- final int background;
+ final int? background;
/// A color that's clearly legible when drawn on [background].
@Deprecated('Use onSurface instead.')
- final int onBackground;
+ final int? onBackground;
/// A color variant of [surface] that can be used for differentiation against
/// a component using [surface].
@Deprecated('Use surfaceContainerHighest instead.')
- final int surfaceVariant;
+ final int? surfaceVariant;
/// Private constructor requiring all int color values.
///
@@ -292,11 +291,12 @@ class FlexSeedScheme {
required this.onInverseSurface,
required this.inversePrimary,
required this.surfaceTint,
- //
- @Deprecated('Use surface instead.') required this.background,
- @Deprecated('Use onSurface instead.') required this.onBackground,
- @Deprecated('Use surfaceContainerHighest instead.')
- required this.surfaceVariant,
+ // ignore: unused_element
+ @Deprecated('Use surface instead.') this.background,
+ // ignore: unused_element
+ @Deprecated('Use onSurface instead.') this.onBackground,
+ // ignore: unused_element
+ @Deprecated('Use surfaceContainerHighest instead.') this.surfaceVariant,
});
/// Factory that creates a [FlexSeedScheme] based on seed keys and FlexTones
@@ -394,10 +394,6 @@ class FlexSeedScheme {
onInverseSurface: core.neutral.get(tones.onInverseSurfaceTone),
inversePrimary: core.primary.get(tones.inversePrimaryTone),
surfaceTint: core.primary.get(tones.surfaceTintTone),
- // Deprecated colors
- background: core.neutral.get(tones.backgroundTone),
- onBackground: core.neutral.get(tones.onBackgroundTone),
- surfaceVariant: core.neutralVariant.get(tones.surfaceVariantTone),
);
}
}
@@ -843,13 +839,13 @@ extension SeedColorScheme on ColorScheme {
/// Override color for the seed generated [surfaceTint] color.
Color? surfaceTint,
- /// Override color for the seed generated [background] color.
+ /// Override color for the seed generated background color.
@Deprecated('Use surface instead.') Color? background,
- /// Override color for the seed generated [onBackground] color.
+ /// Override color for the seed generated onBackground color.
@Deprecated('Use onSurface instead.') Color? onBackground,
- /// Override color for the seed generated [surfaceVariant] color.
+ /// Override color for the seed generated surfaceVariant color.
@Deprecated('Use surfaceContainerHighest instead.') Color? surfaceVariant,
}) {
// Assert that a none null value has not been assign to tones and variant
diff --git a/lib/src/flex/flex_tones.dart b/lib/src/flex/flex_tones.dart
index 009a2ba..47cd8d5 100644
--- a/lib/src/flex/flex_tones.dart
+++ b/lib/src/flex/flex_tones.dart
@@ -131,10 +131,10 @@ class FlexTones with Diagnosticable {
required this.inversePrimaryTone,
required this.surfaceTintTone,
// Deprecated color tones
- @Deprecated('Use surfaceTone instead.') required this.backgroundTone,
- @Deprecated('Use onSurfaceTone instead.') required this.onBackgroundTone,
+ @Deprecated('Use surfaceTone instead.') this.backgroundTone,
+ @Deprecated('Use onSurfaceTone instead.') this.onBackgroundTone,
@Deprecated('Use surfaceContainerHighestTone instead.')
- required this.surfaceVariantTone,
+ this.surfaceVariantTone,
//
this.primaryChroma,
this.primaryMinChroma,
@@ -238,10 +238,10 @@ class FlexTones with Diagnosticable {
this.shadowTone = 0,
this.scrimTone = 0,
// Deprecated tones
- @Deprecated('Use surfaceTone instead.') this.backgroundTone = 98,
- @Deprecated('Use onSurfaceTone instead.') this.onBackgroundTone = 10,
+ @Deprecated('Use surfaceTone instead.') this.backgroundTone,
+ @Deprecated('Use onSurfaceTone instead.') this.onBackgroundTone,
@Deprecated('Use surfaceContainerHighestTone instead.')
- this.surfaceVariantTone = 90,
+ this.surfaceVariantTone,
//
this.primaryChroma,
this.primaryMinChroma,
@@ -344,10 +344,10 @@ class FlexTones with Diagnosticable {
this.shadowTone = 0,
this.scrimTone = 0,
// Deprecated tones
- @Deprecated('Use surfaceTone instead.') this.backgroundTone = 6,
- @Deprecated('Use onSurfaceTone instead.') this.onBackgroundTone = 90,
+ @Deprecated('Use surfaceTone instead.') this.backgroundTone,
+ @Deprecated('Use onSurfaceTone instead.') this.onBackgroundTone,
@Deprecated('Use surfaceContainerHighestTone instead.')
- this.surfaceVariantTone = 30,
+ this.surfaceVariantTone,
//
this.primaryChroma,
this.primaryMinChroma,
@@ -418,15 +418,10 @@ class FlexTones with Diagnosticable {
/// configuration in Flutter 3.22 and later. This factory is provided if you
/// need and want to use the older Material-3 seed generation setup used in
/// Flutter 3.19 and earlier versions.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.material3Legacy(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
surfaceTone: 99,
- backgroundTone: 99,
primaryChroma: 48,
primaryMinChroma: 48,
secondaryChroma: 16,
@@ -435,7 +430,6 @@ class FlexTones with Diagnosticable {
)
: const FlexTones.dark(
surfaceTone: 10,
- backgroundTone: 10,
primaryChroma: 48,
primaryMinChroma: 48,
secondaryChroma: 16,
@@ -471,10 +465,6 @@ class FlexTones with Diagnosticable {
/// value of 50. Secondary and tertiary key colors use their own chroma
/// with no min limits, making the secondary and tertiary mid tones closer
/// to their used key colors.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.vivid(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -487,7 +477,6 @@ class FlexTones with Diagnosticable {
: const FlexTones.dark(
onPrimaryTone: 10,
primaryContainerTone: 20,
- backgroundTone: 5,
//
primaryMinChroma: 50,
);
@@ -514,10 +503,6 @@ class FlexTones with Diagnosticable {
/// blend level in FlexColorScheme. You can apply alpha blends to this tones
/// setup too, but it is easy to overdo it with these surfaces and
/// backgrounds as starting points.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.vividSurfaces(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -529,7 +514,6 @@ class FlexTones with Diagnosticable {
surfaceTone: 96,
onSurfaceVariantTone: 20,
inverseSurfaceTone: 30,
- backgroundTone: 98,
surfaceTintTone: 30,
//
primaryMinChroma: 50,
@@ -561,14 +545,12 @@ class FlexTones with Diagnosticable {
/// Chroma for neutral is 5 and neutralVariant 10, increased from M3 defaults
/// 6 and 8.
///
- /// Before version 3.10 the tone mapping surface and background are were just
+ /// **NOTE:**
+ ///
+ /// Before version 3.10 the tone mappings of surface and background were just
/// swapped, but since background color is gone in Flutter 3.22 and later, we
/// needed to make a new setup that makes this tones setup be a bit different
/// from the [FlexTones.vividSurfaces] setup.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.vividBackground(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -580,7 +562,6 @@ class FlexTones with Diagnosticable {
surfaceTone: 97,
onSurfaceVariantTone: 20,
inverseSurfaceTone: 30,
- backgroundTone: 95,
surfaceTintTone: 30,
//
primaryMinChroma: 50,
@@ -593,7 +574,6 @@ class FlexTones with Diagnosticable {
onTertiaryTone: 10,
primaryContainerTone: 20,
surfaceTone: 5,
- backgroundTone: 20,
onSurfaceVariantTone: 95,
inverseSurfaceTone: 95,
//
@@ -618,10 +598,6 @@ class FlexTones with Diagnosticable {
/// the spirit of the original theme. It may still be useful to also
/// provide purposefully designed optional extremely high contrast
/// themes as options for the high contrast accessibility themes.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.highContrast(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -631,7 +607,6 @@ class FlexTones with Diagnosticable {
errorContainerTone: 95,
surfaceTintTone: 30,
surfaceTone: 99,
- backgroundTone: 99,
//
primaryMinChroma: 65,
secondaryMinChroma: 55,
@@ -647,8 +622,6 @@ class FlexTones with Diagnosticable {
tertiaryContainerTone: 20,
errorContainerTone: 20,
onErrorContainerTone: 90,
- backgroundTone: 4,
- onBackgroundTone: 96,
surfaceTone: 4,
onSurfaceTone: 96,
surfaceContainerLowestTone: 0,
@@ -661,10 +634,6 @@ class FlexTones with Diagnosticable {
/// Creates a tonal palette extraction setup that results in a very high
/// contrast version of selected ColorsSchemes.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
factory FlexTones.ultraContrast(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -678,12 +647,9 @@ class FlexTones with Diagnosticable {
onErrorContainerTone: 5,
//
surfaceTone: 100,
- backgroundTone: 100,
surfaceContainerLowTone: 98,
surfaceContainerTone: 96,
- onBackgroundTone: 0,
onSurfaceTone: 0,
- surfaceVariantTone: 96,
onSurfaceVariantTone: 6,
onInverseSurfaceTone: 99,
inversePrimaryTone: 90,
@@ -710,13 +676,10 @@ class FlexTones with Diagnosticable {
onErrorTone: 2,
onErrorContainerTone: 98,
//
- backgroundTone: 2,
- onBackgroundTone: 99,
surfaceTone: 2,
surfaceContainerLowestTone: 0,
surfaceContainerLowTone: 6,
onSurfaceTone: 99,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 95,
onInverseSurfaceTone: 10,
outlineTone: 80,
@@ -802,13 +765,8 @@ class FlexTones with Diagnosticable {
/// Creates a tonal palette setup that results in a high contrast colorful
/// candy pop like theme.
///
- /// It has white surface and background (tone 100) in light mode and
- /// low chroma on neutrals (2 and 4). Dark mode uses dark
- /// surface and background tone 5.
- ///
- /// After FSS version 3.1.0 any mappings for background, onBackground and
- /// surfaceVariant are ignored. The colors are deprecated in Flutter 3.22
- /// and no longer colors that should be used.
+ /// It has white surface (tone 100) in light mode and low chroma on neutrals
+ /// (2 and 4). Dark mode uses surface tone 5.
factory FlexTones.candyPop(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -822,11 +780,8 @@ class FlexTones with Diagnosticable {
tertiaryContainerTone: 95,
onTertiaryContainerTone: 6,
//
- backgroundTone: 100,
- onBackgroundTone: 6,
surfaceTone: 100,
onSurfaceTone: 6,
- surfaceVariantTone: 92,
onSurfaceVariantTone: 10,
onInverseSurfaceTone: 98,
inversePrimaryTone: 90,
@@ -855,11 +810,8 @@ class FlexTones with Diagnosticable {
onErrorTone: 6,
onErrorContainerTone: 95,
//
- backgroundTone: 6,
- onBackgroundTone: 95,
surfaceTone: 6,
onSurfaceTone: 95,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 90,
onInverseSurfaceTone: 10,
outlineTone: 60,
@@ -878,9 +830,9 @@ class FlexTones with Diagnosticable {
/// chromacity.
///
/// Uses low surface tint and neutrals with medium chroma.
- /// Theme with background and surface tone 98, in light mode and very low
+ /// Theme with surface tone 98, in light mode and very low
/// chroma in neutrals light mode (2 and 4) and moderate in dark mode
- /// (3 and 6). Dark mode uses dark surface and background tone 6.
+ /// (3 and 6). Dark mode uses dark surface tone 6.
factory FlexTones.chroma(Brightness brightness) =>
brightness == Brightness.light
? const FlexTones.light(
@@ -894,11 +846,8 @@ class FlexTones with Diagnosticable {
tertiaryContainerTone: 95,
onTertiaryContainerTone: 6,
//
- backgroundTone: 99,
- onBackgroundTone: 4,
surfaceTone: 99,
onSurfaceTone: 4,
- surfaceVariantTone: 92,
onSurfaceVariantTone: 10,
onInverseSurfaceTone: 98,
inversePrimaryTone: 90,
@@ -927,13 +876,10 @@ class FlexTones with Diagnosticable {
onErrorTone: 6,
onErrorContainerTone: 95,
//
- backgroundTone: 4,
- onBackgroundTone: 95,
surfaceTone: 4,
surfaceContainerLowestTone: 2,
surfaceContainerLowTone: 6,
onSurfaceTone: 95,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 90,
onInverseSurfaceTone: 10,
outlineTone: 60,
@@ -1016,22 +962,22 @@ class FlexTones with Diagnosticable {
// ignore: avoid_returning_this
if (!useBW) return this;
return copyWith(
- onBackgroundTone: backgroundTone <= 60 ? 100 : 0,
+ // onBackgroundTone: backgroundTone <= 60 ? 100 : 0,
onSurfaceTone: surfaceTone <= 60 ? 100 : 0,
- onSurfaceVariantTone: surfaceVariantTone <= 60 ? 100 : 0,
+ onSurfaceVariantTone: surfaceTone <= 60 ? 100 : 0,
onInverseSurfaceTone: inverseSurfaceTone <= 60 ? 100 : 0,
);
}
- /// Returns a new [FlexTones] instance where the tones for surface and
- /// background are set 0 (black) if it was <= 60 and to 100 (white) if > 60.
+ /// Returns a new [FlexTones] instance where the tones for surface are
+ /// set 0 (black) if it was <= 60 and to 100 (white) if > 60.
///
- /// This will make the seeded colors for [background] and [surface] pure
- /// black or white, depending on if they are dark or light
+ /// This will make the seeded color for [surface] pure
+ /// black or white, depending on if it is dark or light theme.
///
/// This is a modifier, using copyWith, that can be used to change any
/// existing or pre-made [FlexTones] config to not have any color tint in
- /// their seeded [surface] and [background] colors.
+ /// their seeded [surface] color.
///
/// The [useBW] flag is true by default, making the function effective.
/// If set to false, the function is a no op and just returns the [FlexTones]
@@ -1045,7 +991,6 @@ class FlexTones with Diagnosticable {
// ignore: avoid_returning_this
if (!useBW) return this;
return copyWith(
- backgroundTone: backgroundTone <= 60 ? 0 : 100,
surfaceTone: surfaceTone <= 60 ? 0 : 100,
);
}
@@ -1287,16 +1232,16 @@ class FlexTones with Diagnosticable {
/// Tone used for ColorScheme background from neutral [FlexTonalPalette].
@Deprecated('Use surfaceTone instead.')
- final int backgroundTone;
+ final int? backgroundTone;
/// Tone used for ColorScheme onBackground from neutral [FlexTonalPalette].
@Deprecated('Use onSurfaceTone instead.')
- final int onBackgroundTone;
+ final int? onBackgroundTone;
/// Tone used for ColorScheme surfaceVariant from neutralVariant
/// [FlexTonalPalette].
@Deprecated('Use surfaceContainerHighestTone instead.')
- final int surfaceVariantTone;
+ final int? surfaceVariantTone;
/// Cam16 chroma value to use for primary colors [FlexTonalPalette]
/// generation.
@@ -1561,9 +1506,9 @@ class FlexTones with Diagnosticable {
int? onInverseSurfaceTone,
int? inversePrimaryTone,
int? surfaceTintTone,
- // Deprecated color tones.
- int? backgroundTone,
- int? onBackgroundTone,
+ @Deprecated('Use surfaceTone instead.') int? backgroundTone,
+ @Deprecated('Use onSurfaceTone instead.') int? onBackgroundTone,
+ @Deprecated('Use surfaceContainerHighestTone instead.')
int? surfaceVariantTone,
//
double? primaryChroma,
@@ -1646,10 +1591,6 @@ class FlexTones with Diagnosticable {
onInverseSurfaceTone: onInverseSurfaceTone ?? this.onInverseSurfaceTone,
inversePrimaryTone: inversePrimaryTone ?? this.inversePrimaryTone,
surfaceTintTone: surfaceTintTone ?? this.surfaceTintTone,
- // Deprecated color tones.
- backgroundTone: backgroundTone ?? this.backgroundTone,
- onBackgroundTone: onBackgroundTone ?? this.onBackgroundTone,
- surfaceVariantTone: surfaceVariantTone ?? this.surfaceVariantTone,
//
primaryChroma: primaryChroma ?? this.primaryChroma,
primaryMinChroma: primaryMinChroma ?? this.primaryMinChroma,
@@ -1726,10 +1667,6 @@ class FlexTones with Diagnosticable {
other.onInverseSurfaceTone == onInverseSurfaceTone &&
other.inversePrimaryTone == inversePrimaryTone &&
other.surfaceTintTone == surfaceTintTone &&
- // Deprecated color tones.
- other.backgroundTone == backgroundTone &&
- other.onBackgroundTone == onBackgroundTone &&
- other.surfaceVariantTone == surfaceVariantTone &&
//
other.primaryChroma == primaryChroma &&
other.primaryMinChroma == primaryMinChroma &&
@@ -1801,10 +1738,6 @@ class FlexTones with Diagnosticable {
onInverseSurfaceTone,
inversePrimaryTone,
surfaceTintTone,
- // Deprecated color tones.
- backgroundTone,
- onBackgroundTone,
- surfaceVariantTone,
//
primaryChroma,
primaryMinChroma,
@@ -1910,13 +1843,6 @@ class FlexTones with Diagnosticable {
DiagnosticsProperty('inversePrimaryTone', inversePrimaryTone));
properties
.add(DiagnosticsProperty('surfaceTintTone', surfaceTintTone));
- // Deprecated color tones.
- properties.add(DiagnosticsProperty('backgroundTone', backgroundTone));
- properties
- .add(DiagnosticsProperty('onBackgroundTone', onBackgroundTone));
- properties.add(
- DiagnosticsProperty('surfaceVariantTone', surfaceVariantTone));
- //
properties.add(DiagnosticsProperty('primaryChroma', primaryChroma));
properties
.add(DiagnosticsProperty('primaryMinChroma', primaryMinChroma));
diff --git a/lib/src/mcu/scheme/scheme_content.dart b/lib/src/mcu/scheme/scheme_content.dart
index 90b0045..0460ed3 100644
--- a/lib/src/mcu/scheme/scheme_content.dart
+++ b/lib/src/mcu/scheme/scheme_content.dart
@@ -19,9 +19,8 @@ import '../dynamiccolor/variant.dart';
import '../hct/hct.dart';
import '../palettes/tonal_palette.dart';
import '../temperature/temperature_cache.dart';
-import 'scheme.dart';
-/// A scheme that places the source color in [Scheme.primaryContainer].
+/// A scheme that places the source color in Scheme.primaryContainer.
///
/// Primary Container is the source color, adjusted for color relativity.
/// It maintains constant appearance in light mode and dark mode.
diff --git a/lib/src/mcu/scheme/scheme_fidelity.dart b/lib/src/mcu/scheme/scheme_fidelity.dart
index 6bb4453..e1f3afd 100644
--- a/lib/src/mcu/scheme/scheme_fidelity.dart
+++ b/lib/src/mcu/scheme/scheme_fidelity.dart
@@ -19,9 +19,8 @@ import '../dynamiccolor/variant.dart';
import '../hct/hct.dart';
import '../palettes/tonal_palette.dart';
import '../temperature/temperature_cache.dart';
-import 'scheme.dart';
-/// A scheme that places the source color in [Scheme.primaryContainer].
+/// A scheme that places the source color in Scheme.primaryContainer.
///
/// Primary Container is the source color, adjusted for color relativity.
/// It maintains constant appearance in light mode and dark mode.
diff --git a/pubspec.yaml b/pubspec.yaml
index d4b2faa..cc0c298 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: flex_seed_scheme
description: A more flexible and powerful version of Flutter's ColorScheme.fromSeed. Use multiple seed colors, custom chroma and tone mapping.
-version: 3.1.0
+version: 3.1.1-dev.1
homepage: https://github.com/rydmike/flex_seed_scheme
repository: https://github.com/rydmike/flex_seed_scheme
issue_tracker: https://github.com/rydmike/flex_seed_scheme/issues
diff --git a/test/flex_tones_test.dart b/test/flex_tones_test.dart
index 4ae0538..486a5c6 100644
--- a/test/flex_tones_test.dart
+++ b/test/flex_tones_test.dart
@@ -63,10 +63,6 @@ void main() {
onInverseSurfaceTone: 95,
inversePrimaryTone: 80,
surfaceTintTone: 40,
- // Deprecated colors
- backgroundTone: 98,
- onBackgroundTone: 10,
- surfaceVariantTone: 90,
//
primaryChroma: null,
primaryMinChroma: null,
@@ -203,10 +199,6 @@ void main() {
onInverseSurfaceTone: 95,
inversePrimaryTone: 80,
surfaceTintTone: 40,
- // Deprecated colors
- backgroundTone: 98,
- onBackgroundTone: 10,
- surfaceVariantTone: 90,
//
primaryChroma: null,
primaryMinChroma: null,
@@ -240,7 +232,7 @@ void main() {
//
equalsIgnoringHashCodes(
// ignore: lines_longer_than_80_chars
- 'FlexTones#00000(primaryTone: 40, onPrimaryTone: 100, primaryContainerTone: 90, onPrimaryContainerTone: 10, primaryFixedTone: 90, primaryFixedDimTone: 80, onPrimaryFixedTone: 10, onPrimaryFixedVariantTone: 30, secondaryTone: 40, onSecondaryTone: 100, secondaryContainerTone: 90, onSecondaryContainerTone: 10, secondaryFixedTone: 90, secondaryFixedDimTone: 80, onSecondaryFixedTone: 10, onSecondaryFixedVariantTone: 30, tertiaryTone: 40, onTertiaryTone: 100, tertiaryContainerTone: 90, onTertiaryContainerTone: 10, tertiaryFixedTone: 90, tertiaryFixedDimTone: 80, onTertiaryFixedTone: 10, onTertiaryFixedVariantTone: 30, errorTone: 40, errorContainerTone: 90, onErrorContainerTone: 10, surfaceTone: 98, surfaceDimTone: 87, surfaceBrightTone: 98, surfaceContainerLowestTone: 100, surfaceContainerLowTone: 96, surfaceContainerTone: 94, surfaceContainerHighTone: 92, surfaceContainerHighestTone: 90, onSurfaceTone: 10, onSurfaceVariantTone: 30, outlineTone: 50, outlineVariantTone: 80, shadowTone: 0, scrimTone: 0, inverseSurfaceTone: 20, onInverseSurfaceTone: 95, inversePrimaryTone: 80, surfaceTintTone: 40, backgroundTone: 98, onBackgroundTone: 10, surfaceVariantTone: 90, primaryChroma: null, primaryMinChroma: null, secondaryChroma: null, secondaryMinChroma: null, tertiaryChroma: null, tertiaryHueRotation: null, tertiaryMinChroma: null, errorChroma: null, errorMinChroma: null, neutralChroma: 6.0, neutralMinChroma: null, neutralVariantChroma: 8.0, neutralVariantMinChroma: null, paletteType: extended)'));
+ 'FlexTones#00000(primaryTone: 40, onPrimaryTone: 100, primaryContainerTone: 90, onPrimaryContainerTone: 10, primaryFixedTone: 90, primaryFixedDimTone: 80, onPrimaryFixedTone: 10, onPrimaryFixedVariantTone: 30, secondaryTone: 40, onSecondaryTone: 100, secondaryContainerTone: 90, onSecondaryContainerTone: 10, secondaryFixedTone: 90, secondaryFixedDimTone: 80, onSecondaryFixedTone: 10, onSecondaryFixedVariantTone: 30, tertiaryTone: 40, onTertiaryTone: 100, tertiaryContainerTone: 90, onTertiaryContainerTone: 10, tertiaryFixedTone: 90, tertiaryFixedDimTone: 80, onTertiaryFixedTone: 10, onTertiaryFixedVariantTone: 30, errorTone: 40, errorContainerTone: 90, onErrorContainerTone: 10, surfaceTone: 98, surfaceDimTone: 87, surfaceBrightTone: 98, surfaceContainerLowestTone: 100, surfaceContainerLowTone: 96, surfaceContainerTone: 94, surfaceContainerHighTone: 92, surfaceContainerHighestTone: 90, onSurfaceTone: 10, onSurfaceVariantTone: 30, outlineTone: 50, outlineVariantTone: 80, shadowTone: 0, scrimTone: 0, inverseSurfaceTone: 20, onInverseSurfaceTone: 95, inversePrimaryTone: 80, surfaceTintTone: 40, primaryChroma: null, primaryMinChroma: null, secondaryChroma: null, secondaryMinChroma: null, tertiaryChroma: null, tertiaryHueRotation: null, tertiaryMinChroma: null, errorChroma: null, errorMinChroma: null, neutralChroma: 6.0, neutralMinChroma: null, neutralVariantChroma: 8.0, neutralVariantMinChroma: null, paletteType: extended)'));
});
test(
'FTO1.11: Test toStringShort implemented via debugFillProperties '
@@ -319,10 +311,6 @@ void main() {
onInverseSurfaceTone: 95,
inversePrimaryTone: 80,
surfaceTintTone: 40,
- // Deprecated colors
- backgroundTone: 98,
- onBackgroundTone: 10,
- surfaceVariantTone: 90,
//
primaryChroma: null,
primaryMinChroma: null,
@@ -397,10 +385,6 @@ void main() {
onInverseSurfaceTone: 20,
inversePrimaryTone: 40,
surfaceTintTone: 80,
- // Deprecated colors
- backgroundTone: 6,
- onBackgroundTone: 90,
- surfaceVariantTone: 30,
//
primaryChroma: null,
primaryMinChroma: null,
@@ -447,7 +431,6 @@ void main() {
FlexTones.material3Legacy(Brightness.light),
equals(const FlexTones.light(
surfaceTone: 99,
- backgroundTone: 99,
primaryChroma: 48,
primaryMinChroma: 48,
secondaryChroma: 16,
@@ -462,7 +445,6 @@ void main() {
FlexTones.material3Legacy(Brightness.dark),
equals(const FlexTones.dark(
surfaceTone: 10,
- backgroundTone: 10,
onErrorContainerTone: 90,
primaryChroma: 48,
primaryMinChroma: 48,
@@ -518,7 +500,6 @@ void main() {
const FlexTones.dark(
onPrimaryTone: 10,
primaryContainerTone: 20,
- backgroundTone: 5,
primaryMinChroma: 50,
),
),
@@ -537,7 +518,6 @@ void main() {
surfaceTone: 96,
onSurfaceVariantTone: 20,
inverseSurfaceTone: 30,
- backgroundTone: 98,
surfaceTintTone: 30,
//
primaryMinChroma: 50,
@@ -580,7 +560,6 @@ void main() {
surfaceTone: 97,
onSurfaceVariantTone: 20,
inverseSurfaceTone: 30,
- backgroundTone: 95,
surfaceTintTone: 30,
//
primaryMinChroma: 50,
@@ -600,7 +579,6 @@ void main() {
onTertiaryTone: 10,
primaryContainerTone: 20,
surfaceTone: 5,
- backgroundTone: 20,
onSurfaceVariantTone: 95,
inverseSurfaceTone: 95,
//
@@ -622,7 +600,6 @@ void main() {
errorContainerTone: 95,
surfaceTintTone: 30,
surfaceTone: 99,
- backgroundTone: 99,
primaryChroma: null,
secondaryChroma: null,
tertiaryChroma: null,
@@ -647,8 +624,6 @@ void main() {
tertiaryContainerTone: 20,
errorContainerTone: 20,
onErrorContainerTone: 90,
- backgroundTone: 4,
- onBackgroundTone: 96,
surfaceTone: 4,
onSurfaceTone: 96,
surfaceContainerLowestTone: 0,
@@ -678,12 +653,9 @@ void main() {
onErrorContainerTone: 5,
//
surfaceTone: 100,
- backgroundTone: 100,
surfaceContainerLowTone: 98,
surfaceContainerTone: 96,
- onBackgroundTone: 0,
onSurfaceTone: 0,
- surfaceVariantTone: 96,
onSurfaceVariantTone: 6,
onInverseSurfaceTone: 99,
inversePrimaryTone: 90,
@@ -717,13 +689,10 @@ void main() {
onErrorTone: 2,
onErrorContainerTone: 98,
//
- backgroundTone: 2,
- onBackgroundTone: 99,
surfaceTone: 2,
surfaceContainerLowestTone: 0,
surfaceContainerLowTone: 6,
onSurfaceTone: 99,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 95,
onInverseSurfaceTone: 10,
outlineTone: 80,
@@ -833,11 +802,8 @@ void main() {
tertiaryContainerTone: 95,
onTertiaryContainerTone: 6,
//
- backgroundTone: 100,
- onBackgroundTone: 6,
surfaceTone: 100,
onSurfaceTone: 6,
- surfaceVariantTone: 92,
onSurfaceVariantTone: 10,
onInverseSurfaceTone: 98,
inversePrimaryTone: 90,
@@ -874,11 +840,8 @@ void main() {
onErrorTone: 6,
onErrorContainerTone: 95,
//
- backgroundTone: 6,
- onBackgroundTone: 95,
surfaceTone: 6,
onSurfaceTone: 95,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 90,
onInverseSurfaceTone: 10,
outlineTone: 60,
@@ -911,11 +874,8 @@ void main() {
tertiaryContainerTone: 95,
onTertiaryContainerTone: 6,
//
- backgroundTone: 99,
- onBackgroundTone: 4,
surfaceTone: 99,
onSurfaceTone: 4,
- surfaceVariantTone: 92,
onSurfaceVariantTone: 10,
onInverseSurfaceTone: 98,
inversePrimaryTone: 90,
@@ -952,13 +912,10 @@ void main() {
onErrorTone: 6,
onErrorContainerTone: 95,
//
- backgroundTone: 4,
- onBackgroundTone: 95,
surfaceTone: 4,
surfaceContainerLowestTone: 2,
surfaceContainerLowTone: 6,
onSurfaceTone: 95,
- surfaceVariantTone: 20,
onSurfaceVariantTone: 90,
onInverseSurfaceTone: 10,
outlineTone: 60,
@@ -1032,10 +989,6 @@ void main() {
onInverseSurfaceTone: 95,
inversePrimaryTone: 80,
surfaceTintTone: 40,
- // Deprecated colors
- backgroundTone: 98,
- onBackgroundTone: 10,
- surfaceVariantTone: 90,
//
primaryChroma: null,
primaryMinChroma: 48,
@@ -1175,10 +1128,6 @@ void main() {
onInverseSurfaceTone: 95,
inversePrimaryTone: 80,
surfaceTintTone: 40,
- // Deprecated colors
- backgroundTone: 98,
- onBackgroundTone: 10,
- surfaceVariantTone: 90,
//
primaryChroma: null,
primaryMinChroma: 48,
@@ -1257,10 +1206,6 @@ void main() {
onInverseSurfaceTone: 20,
inversePrimaryTone: 40,
surfaceTintTone: 80,
- // Deprecated colors
- backgroundTone: 6,
- onBackgroundTone: 90,
- surfaceVariantTone: 30,
//
primaryChroma: null,
primaryMinChroma: 48,