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