|
1 | 1 | import 'dart:io';
|
2 | 2 |
|
3 | 3 | import 'package:dynamic_color/dynamic_color.dart';
|
4 |
| -import 'package:flex_seed_scheme/flex_seed_scheme.dart'; |
5 | 4 | import 'package:flutter/material.dart';
|
6 | 5 | import 'package:flutter/services.dart';
|
7 | 6 | import 'package:flutter_localizations/flutter_localizations.dart';
|
@@ -129,43 +128,41 @@ class _DynamicMaterialAppState extends State<DynamicMaterialApp>
|
129 | 128 |
|
130 | 129 | if (Prefs.accentColor.loaded && Prefs.accentColor.value != 0) {
|
131 | 130 | seedColor = Color(Prefs.accentColor.value);
|
132 |
| - lightColorScheme = SeedColorScheme.fromSeeds( |
| 131 | + lightColorScheme = ColorScheme.fromSeed( |
133 | 132 | brightness: Brightness.light,
|
134 |
| - primaryKey: seedColor, |
| 133 | + seedColor: seedColor, |
135 | 134 | );
|
136 |
| - darkColorScheme = SeedColorScheme.fromSeeds( |
| 135 | + darkColorScheme = ColorScheme.fromSeed( |
137 | 136 | brightness: Brightness.dark,
|
138 |
| - primaryKey: seedColor, |
| 137 | + seedColor: seedColor, |
139 | 138 | );
|
140 | 139 | } else if (lightDynamic != null && darkDynamic != null) {
|
141 | 140 | lightColorScheme = lightDynamic.harmonized();
|
142 | 141 | darkColorScheme = darkDynamic.harmonized();
|
143 | 142 | seedColor = lightColorScheme.primary;
|
144 | 143 | } else {
|
145 | 144 | seedColor = widget.defaultSwatch;
|
146 |
| - lightColorScheme = SeedColorScheme.fromSeeds( |
| 145 | + lightColorScheme = ColorScheme.fromSeed( |
147 | 146 | brightness: Brightness.light,
|
148 |
| - primaryKey: seedColor, |
| 147 | + seedColor: seedColor, |
149 | 148 | );
|
150 |
| - darkColorScheme = SeedColorScheme.fromSeeds( |
| 149 | + darkColorScheme = ColorScheme.fromSeed( |
151 | 150 | brightness: Brightness.dark,
|
152 |
| - primaryKey: seedColor, |
| 151 | + seedColor: seedColor, |
153 | 152 | );
|
154 | 153 | }
|
155 | 154 |
|
156 |
| - final ColorScheme highContrastLightColorScheme = |
157 |
| - SeedColorScheme.fromSeeds( |
| 155 | + final highContrastLightColorScheme = ColorScheme.fromSeed( |
158 | 156 | brightness: Brightness.light,
|
159 |
| - primaryKey: seedColor, |
| 157 | + seedColor: seedColor, |
160 | 158 | surface: Colors.white,
|
161 |
| - tones: FlexTones.ultraContrast(Brightness.light), |
| 159 | + contrastLevel: 1, |
162 | 160 | );
|
163 |
| - final ColorScheme highContrastDarkColorScheme = |
164 |
| - SeedColorScheme.fromSeeds( |
| 161 | + final highContrastDarkColorScheme = ColorScheme.fromSeed( |
165 | 162 | brightness: Brightness.dark,
|
166 |
| - primaryKey: seedColor, |
| 163 | + seedColor: seedColor, |
167 | 164 | surface: Colors.black,
|
168 |
| - tones: FlexTones.ultraContrast(Brightness.dark), |
| 165 | + contrastLevel: 1, |
169 | 166 | );
|
170 | 167 |
|
171 | 168 | final TargetPlatform? platform = switch (Prefs.platform.value) {
|
|
0 commit comments