feat(ui_kit): update example by removing adaptative theme

This commit is contained in:
2023-04-28 14:04:15 +02:00
parent 4097a420c8
commit a024b7e70a
11 changed files with 184 additions and 101 deletions
@@ -14,10 +14,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:flutter/material.dart' hide CardTheme;
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:wyatt_ui_kit/wyatt_ui_kit.dart';
import 'package:wyatt_ui_kit_example/cubit/app_mode_cubit.dart';
/// Easely switch between Material and Studio themes.
abstract class Themes {
@@ -46,17 +47,11 @@ abstract class Themes {
}
static void material(BuildContext context) {
AdaptiveTheme.of(context).setTheme(
light: materialLight,
dark: materialDark,
);
context.read<AppModeCubit>().changeTheme(0);
}
static void studio(BuildContext context) {
AdaptiveTheme.of(context).setTheme(
light: studioLight,
dark: studioDark,
);
context.read<AppModeCubit>().changeTheme(1);
}
static ThemeData get materialLight => ThemeData.light().copyWith(