22 lines
487 B
Dart
22 lines
487 B
Dart
import 'package:fl_clash/widgets/scaffold.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
extension BuildContextExtension on BuildContext {
|
|
|
|
CommonScaffoldState? get commonScaffoldState {
|
|
return findAncestorStateOfType<CommonScaffoldState>();
|
|
}
|
|
|
|
Size get appSize{
|
|
return MediaQuery.of(this).size;
|
|
}
|
|
|
|
double get width {
|
|
return appSize.width;
|
|
}
|
|
|
|
ColorScheme get colorScheme => Theme.of(this).colorScheme;
|
|
|
|
TextTheme get textTheme => Theme.of(this).textTheme;
|
|
}
|