mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
16 lines
418 B
Dart
16 lines
418 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'app_colors.dart';
|
|
|
|
extension AppThemeExtension on BuildContext {
|
|
ThemeData get theme => Theme.of(this);
|
|
ColorScheme get colors => theme.colorScheme;
|
|
TextTheme get textTheme => theme.textTheme;
|
|
|
|
AppColors get appColors {
|
|
final ext = theme.extension<AppColors>();
|
|
assert(ext != null, 'AppColors not found in ThemeData.extensions');
|
|
return ext!;
|
|
}
|
|
}
|