Files
syncrow-web/lib/utils/extension/build_context_x.dart
2024-08-29 12:55:37 +03:00

18 lines
489 B
Dart

import 'package:flutter/material.dart';
extension BuildContextExt on BuildContext {
ThemeData get theme => Theme.of(this);
TextTheme get textTheme => Theme.of(this).textTheme;
AppBarTheme get appBarTheme => Theme.of(this).appBarTheme;
Size get screenSize => MediaQuery.of(this).size;
double get screenWidth => MediaQuery.of(this).size.width;
double get screenHeight => MediaQuery.of(this).size.height;
double get textScale => MediaQuery.textScalerOf(this).scale(1);
}