mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
## Pull Request Description Added the google fonts locally Also added back saved servers for web ## Issue Being Fixed Issue Number: #54 ## Screenshots / Recordings <!-- This section is optional but highly recommended to show off your changes! --> ## Checklist - [ ] If a new package was added, did you ensure it works for all supported platforms? Is the package also well maintained? - [ ] Did you add localization for any text? If yes, did you sort the .arb file using ```arb_utils sort <INPUT_FILE>```? - [ ] Check that any changes are related to the issue at hand. --------- Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
ff45bb8641
commit
9df13cfb34
12 changed files with 189 additions and 64 deletions
115
lib/theme/fonts.dart
Normal file
115
lib/theme/fonts.dart
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class FladderFonts {
|
||||
static TextTheme rubikTextTheme([TextTheme? textTheme]) {
|
||||
textTheme ??= ThemeData.light().textTheme;
|
||||
|
||||
return TextTheme(
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.displayLarge?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 300),
|
||||
],
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.displayMedium?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 400),
|
||||
],
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.displaySmall?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 500),
|
||||
],
|
||||
),
|
||||
headlineLarge: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.headlineLarge?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 600),
|
||||
],
|
||||
),
|
||||
headlineMedium: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.headlineMedium?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 700),
|
||||
],
|
||||
),
|
||||
headlineSmall: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.headlineSmall?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 800),
|
||||
],
|
||||
),
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.titleLarge?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 400),
|
||||
],
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.titleMedium?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 500),
|
||||
],
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.titleSmall?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 600),
|
||||
],
|
||||
),
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.bodyLarge?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 400),
|
||||
],
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.bodyMedium?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 500),
|
||||
],
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.bodySmall?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 400),
|
||||
],
|
||||
),
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.labelLarge?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 600),
|
||||
],
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.labelMedium?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 500),
|
||||
],
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: 'Rubik',
|
||||
fontSize: textTheme.labelSmall?.fontSize,
|
||||
fontVariations: [
|
||||
const FontVariation('wght', 400),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue