custom font improvements
This commit is contained in:
@@ -4,7 +4,9 @@ import 'dart:math';
|
||||
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:refilc/api/providers/update_provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/theme/colors/utils.dart';
|
||||
import 'package:refilc/ui/date_widget.dart';
|
||||
import 'package:refilc_kreta_api/models/absence.dart';
|
||||
@@ -180,10 +182,22 @@ class AbsencesPageState extends State<AbsencesPage>
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text(
|
||||
"Absences".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
style: Provider.of<SettingsProvider>(context).fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context).titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context).fontFamily,
|
||||
textStyle: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
)
|
||||
: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
bottom: FilterBar(
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:refilc/api/providers/update_provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/ui/widgets/grade/grade_tile.dart';
|
||||
@@ -576,10 +577,20 @@ class GradesPageState extends State<GradesPage> {
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text(
|
||||
"Grades".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
style: Provider.of<SettingsProvider>(context).fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context).titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context).fontFamily,
|
||||
textStyle: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
)
|
||||
: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
shadowColor: Theme.of(context).shadowColor,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:refilc/api/providers/live_card_provider.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:refilc/ui/date_widget.dart';
|
||||
@@ -244,14 +245,34 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
greeting,
|
||||
overflow: TextOverflow.fade,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18.0,
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.color,
|
||||
),
|
||||
style:
|
||||
Provider.of<SettingsProvider>(context)
|
||||
.fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(
|
||||
context)
|
||||
.titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(
|
||||
context)
|
||||
.fontFamily,
|
||||
textStyle: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18.0,
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.color,
|
||||
),
|
||||
)
|
||||
: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18.0,
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.color,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
DateFormat('EEEE, MMM d',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:refilc/api/providers/update_provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/ui/date_widget.dart';
|
||||
import 'package:refilc_kreta_api/providers/message_provider.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
@@ -129,10 +131,22 @@ class MessagesPageState extends State<MessagesPage>
|
||||
),
|
||||
Text(
|
||||
"Messages".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
style: Provider.of<SettingsProvider>(context)
|
||||
.fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context)
|
||||
.titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context).fontFamily,
|
||||
textStyle: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
)
|
||||
: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/api/providers/self_note_provider.dart';
|
||||
import 'package:refilc/api/providers/update_provider.dart';
|
||||
@@ -326,10 +327,20 @@ class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text(
|
||||
"notes".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
style: Provider.of<SettingsProvider>(context).fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context).titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context).fontFamily,
|
||||
textStyle: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
)
|
||||
: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:refilc/utils/format.dart';
|
||||
@@ -50,11 +53,26 @@ class _DayTitleState extends State<DayTitle> {
|
||||
width: MediaQuery.of(context).size.width / 1.5,
|
||||
child: Text(
|
||||
widget.dayTitle(index).capital(),
|
||||
style: TextStyle(
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(opacity),
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
style: Provider.of<SettingsProvider>(context)
|
||||
.fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context)
|
||||
.titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context).fontFamily,
|
||||
textStyle: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(opacity),
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
)
|
||||
: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(opacity),
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:math';
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:i18n_extension/i18n_extension.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/api/providers/update_provider.dart';
|
||||
@@ -375,11 +376,25 @@ class TimetablePageState extends State<TimetablePage>
|
||||
} else {
|
||||
return Text(
|
||||
"timetable".i18n,
|
||||
style: TextStyle(
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
style: Provider.of<SettingsProvider>(context)
|
||||
.fontFamily !=
|
||||
'' &&
|
||||
Provider.of<SettingsProvider>(context)
|
||||
.titleOnlyFont
|
||||
? GoogleFonts.getFont(
|
||||
Provider.of<SettingsProvider>(context)
|
||||
.fontFamily,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
)
|
||||
: TextStyle(
|
||||
fontSize: 32.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
);
|
||||
}
|
||||
}(),
|
||||
|
||||
Reference in New Issue
Block a user