This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | |
import 'package:meta_app/presentation/themes/theme.dart'; | |
extension BuildContextExt on BuildContext { | |
AppLocalizations get localizations => AppLocalizations.of(this)!; | |
ThemeTextStyles get text => Theme.of(this).extension<ThemeTextStyles>()!; | |
ThemeColors get color => Theme.of(this).extension<ThemeColors>()!; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ThemeData( | |
textTheme: createTextTheme(), | |
brightness: Brightness.light, | |
scaffoldBackgroundColor: AppColors.white, | |
extensions: <ThemeExtension<dynamic>>[ | |
ThemeColors.light, | |
ThemeTextStyles.light, | |
ThemeGradients.light, | |
], | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of '../theme.dart'; | |
class ThemeColors extends ThemeExtension<ThemeColors> { | |
final Color filterButtonFillColor; | |
const ThemeColors({ | |
required this.filterButtonFillColor, | |
}); | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of '../theme.dart'; | |
const headline1 = TextStyle(fontWeight: FontWeight.w400, fontSize: 16); | |
const headline2 = TextStyle(fontWeight: FontWeight.w400, fontSize: 14); | |
abstract class AppColors { | |
static const white = Colors.white; | |
static const black = Colors.black; | |
static const blue = Colors.blue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of '../theme.dart'; | |
TextTheme createTextTheme() { | |
return const TextTheme( | |
headline1: headline1, | |
headline2: headline2, | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of '../theme.dart'; | |
ThemeData createLightTheme() { | |
return ThemeData( | |
textTheme: createTextTheme(), | |
brightness: Brightness.light, | |
scaffoldBackgroundColor: AppColors.white, | |
extensions: <ThemeExtension<dynamic>>[ | |
ThemeColors.light, | |
ThemeTextStyles.light, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
part 'src/constants.dart'; | |
part 'src/dark_theme.dart'; | |
part 'src/light_theme.dart'; | |
part 'src/text_theme.dart'; | |
part 'src/theme_colors.dart'; | |
part 'src/theme_text_styles.dart'; | |
part 'src/theme_gradients.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "flutter: analyze", | |
"type": "shell", | |
"command": "flutter", | |
"group": "build", | |
"runOptions": { | |
"instanceLimit": 1, |