Revert m3e_design version to 0.2.0; add theme accessors to simplify retrieval of M3E theme from ThemeData. Update changelog and refactor BuildContext extension with new accessor.
This commit is contained in:
parent
a255494ec1
commit
eef97c0938
4 changed files with 19 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/m3e_theme.dart';
|
||||
|
||||
extension BuildContextM3EX on BuildContext {
|
||||
M3ETheme get m3e =>
|
||||
Theme.of(this).extension<M3ETheme>() ?? M3ETheme.defaults(Theme.of(this).colorScheme);
|
||||
M3ETheme get m3e => Theme.of(this).m3e;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue