mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02: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!;
|
|
}
|
|
}
|