This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| final light = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.light); | |
| final dark = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.dark); | |
| return MaterialApp( | |
| title: 'M3E Gallery', | |
| theme: light.toM3EThemeData(override: M3eOverride(colors: M3ECustomColors.from(light), | |
| brandColors: M3EBrandColors.copyWith(brandOne: brandOne.harmonizeWith(light.primary), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2026 Fredrick Allan Grott. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| // | |
| // Modified from m3e_design package | |
| // Copyright (c) 2025 Emily Moonstone | |
| // MIT Licnese | |
| // ignore_for_file: prefer_constructors_over_static_methods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ignore_for_file: prefer_constructors_over_static_methods | |
| import 'package:dynamic_color/dynamic_color.dart'; | |
| import 'package:flutter/material.dart'; | |
| /// Since M3ETheme takes a color scheme as a paremeter | |
| /// the brand colors has to be injected using a immutable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| return DynamicColorBuilder( | |
| builder: (lightDynamic, darkDynamic){ | |
| final light = lightDynamic ?? ColorScheme.fromSeed(seedColor: Colors.teal); | |
| final dark = darkDynamic ?? | |
| ColorScheme.fromSeed(seedColor: Colors.teal, brightness: Brightness.dark); | |
| return MaterialApp( | |
| theme: light.toM3EThemeData(override: M3eOverride(colors: M3ECustomColors.from(light), | |
| typography: M3ECustomTypography(base: CustomTextTheme, emphasized: MyM3ECustomEmphasized ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| final light = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.light); | |
| final dark = ColorScheme.fromSeed( | |
| seedColor: Colors.purple, brightness: Brightness.dark); | |
| return MaterialApp( | |
| title: 'M3E Gallery', | |
| theme: light.toM3EThemeData(override: M3eOverride(colors: M3ECustomColors.from(light), | |
| typography: M3ECustomTypography(base: CustomTextTheme, emphasized: MyM3ECustomEmphasized ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Expressive emphasis tweaks layered on top of baseline M3 type. | |
| /// Keep line-height the same; only tune weight/letter-spacing for emphasis. | |
| /// For most purposes, the M3ECustomEmphasized() construct is used. | |
| @immutable | |
| class M3ECustomEmphasized { | |
| final TextStyle expressiveDisplayLarge; | |
| final TextStyle expressiveDisplayMedium; | |
| final TextStyle expressiveDisplaySmall; | |
| final TextStyle expressiveHeadlineLarge; | |
| final TextStyle expressiveHeadlineMedium; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @immutable | |
| class ButtonFontSize { | |
| final double xs; | |
| final double sm; | |
| final double md; | |
| final double lg; | |
| final double xl; | |
| const ButtonFontSize({this.xs = 14, this.sm = 14, this.md = 16, this.lg = 20, this.xl = 24}); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Material 3 Expressive typography tokens. | |
| /// - `base` starts from **M3 (Typography.material2021)**. | |
| /// - Optionally remaps fonts: brand (UI) for display/headline/title/label | |
| /// and plain (reading) for body. | |
| /// - Adds an emphasized set (weight/tracking tweaks) for expressive hierarchy. | |
| @immutable | |
| class M3ECustomTypography { | |
| final TextTheme base; | |
| final M3ECustomEmphasized emphasized; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Expressive emphasis tweaks layered on top of baseline M3 type. | |
| /// Keep line-height the same; only tune weight/letter-spacing for emphasis. | |
| /// For most purposes, the M3ECustomEmphasized() construct is used. | |
| @immutable | |
| class M3ECustomEmphasized { | |
| final TextStyle expressiveDisplayLarge; | |
| final TextStyle expressiveDisplayMedium; | |
| final TextStyle expressiveDisplaySmall; | |
| final TextStyle expressiveHeadlineLarge; | |
| final TextStyle expressiveHeadlineMedium; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class kVarWdth { | |
| static const FontVariation displayLarge = FontVariation('wdth', 100); | |
| static const FontVariation displayMedium = FontVariation('wdth', 100); | |
| static const FontVariation displaySmall = FontVariation('wdth', 100); | |
| static const FontVariation headlineLarge = FontVariation('wdth', 100); | |
| static const FontVariation headlineMedium = FontVariation('wdth', 100); |
NewerOlder