Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added asset/fonts/Poppins-Black.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-BlackItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Bold.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-BoldItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-ExtraBold.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-ExtraBoldItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-ExtraLight.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-ExtraLightItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Italic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Light.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-LightItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Medium.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-MediumItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Regular.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-SemiBold.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-SemiBoldItalic.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-Thin.ttf
Binary file not shown.
Binary file added asset/fonts/Poppins-ThinItalic.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/core/constants/app/app_constants.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class ApplicationConstants {
static const LANG_ASSET_PATH = "asset/lang";
static const IPAD_NAME = "IPAD";

static const FONT_FAMILY = "POPPINS";
static const COMPANY_NAME = "HWA";

static const EMAIL_REGIEX = r"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}\$";
Expand Down
43 changes: 41 additions & 2 deletions lib/core/init/theme/app_theme_light.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:fluttermvvmtemplate/core/constants/app/app_constants.dart';
import 'package:fluttermvvmtemplate/core/init/theme/app_theme.dart';

class AppThemeLight extends AppTheme {
import 'light/light_theme_interface.dart';

class AppThemeLight extends AppTheme with ILightTheme {
static AppThemeLight _instance;
static AppThemeLight get instance {
if (_instance == null) _instance = AppThemeLight._init();
Expand All @@ -10,5 +13,41 @@ class AppThemeLight extends AppTheme {

AppThemeLight._init();

ThemeData get theme => ThemeData.light();
// ThemeData get theme => redTheme;
ThemeData get theme => ThemeData(
fontFamily: ApplicationConstants.FONT_FAMILY,
colorScheme: _appColorScheme(),
textTheme: textTheme(),
floatingActionButtonTheme: ThemeData.light().floatingActionButtonTheme.copyWith(),
tabBarTheme: tabBarTheme(),
);

TabBarTheme tabBarTheme() {
return TabBarTheme(
labelPadding: insets.lowPaddingAll,
unselectedLabelStyle: textThemeLight.headline4.copyWith(color: colorSchemeLight.red),
);
}

TextTheme textTheme() {
return TextTheme(
headline1: textThemeLight.headline1, headline2: textThemeLight.headline2, overline: textThemeLight.headline3);
}

ColorScheme _appColorScheme() {
return ColorScheme(
primary: colorSchemeLight.black,
primaryVariant: Colors.white,
secondary: Colors.green,
secondaryVariant: Colors.green[200],
surface: Colors.blue,
background: Colors.white,
error: Colors.red[900],
onPrimary: Colors.greenAccent,
onSecondary: Colors.black38,
onSurface: Colors.white30,
onBackground: Colors.black12,
onError: Colors.red,
brightness: Brightness.light);
}
}
19 changes: 19 additions & 0 deletions lib/core/init/theme/light/color_scheme_light.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';

class ColorSchemeLight {
static ColorSchemeLight _instace;
static ColorSchemeLight get instance {
if (_instace == null) _instace = ColorSchemeLight._init();
return _instace;
}

ColorSchemeLight._init();

final Color brown = Color(0xffa87e6f);
final Color red = Color(0xffc10e0e);
final Color white = Color(0xffffffff);
final Color gray = Color(0xffa5a6ae);
final Color lightGray = Color(0xfff7f7f7);
final Color darkGray = Color(0xff676870);
final Color black = Color(0xff020306);
}
9 changes: 9 additions & 0 deletions lib/core/init/theme/light/light_theme_interface.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'package:fluttermvvmtemplate/core/init/theme/light/color_scheme_light.dart';
import 'package:fluttermvvmtemplate/core/init/theme/light/padding_insets.dart';
import 'package:fluttermvvmtemplate/core/init/theme/light/text_theme_light.dart';

abstract class ILightTheme {
TextThemeLight textThemeLight = TextThemeLight.instance;
ColorSchemeLight colorSchemeLight = ColorSchemeLight.instance;
PaddingInsets insets = PaddingInsets();
}
5 changes: 5 additions & 0 deletions lib/core/init/theme/light/padding_insets.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'package:flutter/rendering.dart';

class PaddingInsets {
final lowPaddingAll = EdgeInsets.all(5);
}
18 changes: 18 additions & 0 deletions lib/core/init/theme/light/text_theme_light.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';

class TextThemeLight {
static TextThemeLight _instace;
static TextThemeLight get instance {
if (_instace == null) _instace = TextThemeLight._init();
return _instace;
}

TextThemeLight._init();

final TextStyle headline1 = TextStyle(fontSize: 96, fontWeight: FontWeight.w300, letterSpacing: -1.5);
final TextStyle headline2 = TextStyle(fontSize: 60, fontWeight: FontWeight.w300, letterSpacing: -0.5);
final TextStyle headline3 = TextStyle(fontSize: 48, fontWeight: FontWeight.w400);
final TextStyle headline4 = TextStyle(fontSize: 34, fontWeight: FontWeight.w400, letterSpacing: 0.25);
final TextStyle headline5 = TextStyle(fontSize: 24, fontWeight: FontWeight.w400);
final TextStyle overline = TextStyle(fontSize: 10, fontWeight: FontWeight.w400, letterSpacing: 1.5);
}
Loading