Skip to content

Commit

Permalink
feature: change app colors to the standard on flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
dherediat97 committed Jul 21, 2024
1 parent 75c9e2d commit d955811
Show file tree
Hide file tree
Showing 31 changed files with 375 additions and 728 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions lib/app/constants/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class AppConstants {
static int personId = 0;
static const bool debugRequest = false;

static Uri myGithubPage = Uri.parse('https://github.com/dherediat97');

//PREFERENCES KEYS
static const languageKey = 'languageCode';
static const themeModeKey = 'themeMode';
}
76 changes: 72 additions & 4 deletions lib/app/constants/app_fonts.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,81 @@
import 'package:film_flu/gen/fonts.gen.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class AppFonts {
static String primaryFont = FontFamily.ysabeauInfant;
static String secondaryFont = FontFamily.lilitaOne;
static String tertiaryFont = FontFamily.shadowsIntoLight;
static String primaryFont = 'Ysabeau';
static String secondaryFont = 'LilitaOne';
static String tertiaryFont = 'Shadows Into Light';

const AppFonts(
primaryFont,
secondaryFont,
tertiaryFont,
);
}

TextTheme createTextTheme(
BuildContext context, String bodyFontString, String displayFontString) {
TextTheme baseTextTheme = Theme.of(context).textTheme;

TextTheme titleTextTheme =
GoogleFonts.getTextTheme(bodyFontString, baseTextTheme);

TextTheme bodyTextTheme =
GoogleFonts.getTextTheme(bodyFontString, baseTextTheme);

TextTheme displayTextTheme =
GoogleFonts.getTextTheme(displayFontString, baseTextTheme);

TextTheme textTheme = displayTextTheme.copyWith(
displayLarge: displayTextTheme.displayLarge?.copyWith(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
),
displayMedium: displayTextTheme.displayMedium?.copyWith(
fontSize: 15,
color: Theme.of(context).colorScheme.secondary,
),
displaySmall: displayTextTheme.displaySmall?.copyWith(
fontSize: 12,
color: Theme.of(context).colorScheme.secondary,
),
bodyLarge: bodyTextTheme.bodyLarge?.copyWith(
fontSize: 24,
color: Theme.of(context).colorScheme.secondary,
),
bodyMedium: bodyTextTheme.bodyMedium?.copyWith(
fontSize: 15,
color: Theme.of(context).colorScheme.secondary,
),
bodySmall: bodyTextTheme.bodySmall?.copyWith(
fontSize: 15,
color: Theme.of(context).colorScheme.secondary,
),
labelLarge: bodyTextTheme.labelLarge?.copyWith(
fontSize: 12,
color: Theme.of(context).colorScheme.secondary,
),
labelMedium: bodyTextTheme.labelMedium?.copyWith(
fontSize: 14,
color: Theme.of(context).colorScheme.secondary,
),
labelSmall: bodyTextTheme.labelSmall?.copyWith(
fontSize: 14,
color: Theme.of(context).colorScheme.secondary,
),
titleLarge: titleTextTheme.titleLarge?.copyWith(
fontSize: 40,
color: Theme.of(context).colorScheme.secondary,
),
titleMedium: titleTextTheme.titleMedium?.copyWith(
fontSize: 14,
color: Theme.of(context).colorScheme.secondary,
),
titleSmall: titleTextTheme.titleSmall?.copyWith(
fontSize: 16,
color: Theme.of(context).colorScheme.secondary,
),
);
return textTheme;
}
Loading

0 comments on commit d955811

Please sign in to comment.