feat(ui_kit): add theme extension shortcut
This commit is contained in:
parent
2806ac5923
commit
77ce4e33ab
@ -16,8 +16,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension ThemeExtension on BuildContext {
|
||||
TextTheme get textTheme => Theme.of(this).textTheme;
|
||||
ColorScheme get colorScheme => Theme.of(this).colorScheme;
|
||||
ButtonThemeData get buttonTheme => Theme.of(this).buttonTheme;
|
||||
extension BuildContextThemeExtension on BuildContext {
|
||||
T? themeExtension<T>() => Theme.of(this).extension<T>();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user