forked from mirrors/material_3_expressive
Bump m3e_design to 0.2.1; add .toM3EThemeData() extension for simplified theme creation, update documentation, and refactor BuildContext extension for fallback handling.
This commit is contained in:
parent
eef97c0938
commit
c6e843f238
5 changed files with 88 additions and 20 deletions
|
|
@ -3,5 +3,6 @@ import 'package:flutter/material.dart';
|
|||
import '../theme/m3e_theme.dart';
|
||||
|
||||
extension BuildContextM3EX on BuildContext {
|
||||
M3ETheme get m3e => Theme.of(this).m3e;
|
||||
M3ETheme get m3e =>
|
||||
Theme.of(this).extension<M3ETheme>() ?? M3ETheme.defaults(Theme.of(this).colorScheme);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue