mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
initialized Dashboard Page
This commit is contained in:
30
lib/utils/context_extension.dart
Normal file
30
lib/utils/context_extension.dart
Normal file
@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension ContextExtension on BuildContext {
|
||||
Future<void> goTo(String newRouteName) async {
|
||||
// go(newRouteName);
|
||||
await Navigator.pushNamed(this, newRouteName);
|
||||
}
|
||||
|
||||
double get width => MediaQuery.sizeOf(this).width;
|
||||
|
||||
double get height => MediaQuery.sizeOf(this).height;
|
||||
|
||||
TextStyle get displayLarge => Theme.of(this).textTheme.displayLarge!;
|
||||
|
||||
TextStyle get displayMedium => Theme.of(this).textTheme.displayMedium!;
|
||||
|
||||
TextStyle get displaySmall => Theme.of(this).textTheme.displaySmall!;
|
||||
|
||||
TextStyle get titleLarge => Theme.of(this).textTheme.titleLarge!;
|
||||
|
||||
TextStyle get titleMedium => Theme.of(this).textTheme.titleMedium!;
|
||||
|
||||
TextStyle get titleSmall => Theme.of(this).textTheme.titleSmall!;
|
||||
|
||||
TextStyle get bodyLarge => Theme.of(this).textTheme.bodyLarge!;
|
||||
|
||||
TextStyle get bodyMedium => Theme.of(this).textTheme.bodyMedium!;
|
||||
|
||||
TextStyle get bodySmall => Theme.of(this).textTheme.bodySmall!;
|
||||
}
|
Reference in New Issue
Block a user