1
0
mirror of https://github.com/stonega/tsacdop synced 2025-02-12 17:40:45 +01:00
tsacdop-podcast-app-android/lib/util/context_extension.dart
stonegate 935566b304 Popup menu setting
Auto download on work
Add rewind when using headset
Fixed audio auto play when notification come
2020-06-10 15:42:40 +08:00

13 lines
649 B
Dart

import 'package:flutter/material.dart';
extension ContextExtension on BuildContext{
Color get primaryColor => Theme.of(this).primaryColor;
Color get accentColor => Theme.of(this).accentColor;
Color get scaffoldBackgroundColor => Theme.of(this).scaffoldBackgroundColor;
Color get primaryColorDark => Theme.of(this).primaryColorDark;
Color get textColor => Theme.of(this).textTheme.bodyText1.color;
Brightness get brightness => Theme.of(this).brightness;
double get width => MediaQuery.of(this).size.width;
double get height => MediaQuery.of(this).size.width;
TextTheme get textTheme => Theme.of(this).textTheme;
}