2024-04-30 23:38:49 +08:00
|
|
|
import 'package:fl_clash/widgets/scaffold.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
extension BuildContextExtension on BuildContext {
|
|
|
|
|
|
|
|
|
|
CommonScaffoldState? get commonScaffoldState {
|
|
|
|
|
return findAncestorStateOfType<CommonScaffoldState>();
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-27 01:14:45 +08:00
|
|
|
Size get appSize{
|
|
|
|
|
return MediaQuery.of(this).size;
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-18 10:27:53 +08:00
|
|
|
double get viewWidth {
|
2024-06-27 01:14:45 +08:00
|
|
|
return appSize.width;
|
2024-04-30 23:38:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ColorScheme get colorScheme => Theme.of(this).colorScheme;
|
|
|
|
|
|
|
|
|
|
TextTheme get textTheme => Theme.of(this).textTheme;
|
|
|
|
|
}
|