mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-27 02:57:57 -05:00
feat: dynamic fetch google fonts
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:git_touch/models/code.dart';
|
||||
import 'package:git_touch/models/notification.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
@@ -18,8 +17,6 @@ void main() async {
|
||||
},
|
||||
// Init your App.
|
||||
appRunner: () async {
|
||||
GoogleFonts.config.allowRuntimeFetching = false;
|
||||
|
||||
final notificationModel = NotificationModel();
|
||||
final themeModel = ThemeModel();
|
||||
final authModel = AuthModel();
|
||||
|
||||
@@ -8,21 +8,15 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
class CodeModel with ChangeNotifier {
|
||||
static var themes = themeMap.keys.toList();
|
||||
static const fontSizes = [12, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||
static const fontFamilies = [
|
||||
static final fontFamilies = [
|
||||
'System',
|
||||
'JetBrains Mono',
|
||||
'Fira Code',
|
||||
'Inconsolata',
|
||||
'PT Mono',
|
||||
'Source Code Pro',
|
||||
'Ubuntu Mono',
|
||||
// 'Cascadia Code', // TODO: https://github.com/google/fonts/issues/2179
|
||||
...GoogleFonts.asMap().keys,
|
||||
];
|
||||
|
||||
String _theme = 'vs';
|
||||
String _themeDark = 'vs2015';
|
||||
int _fontSize = 14;
|
||||
String _fontFamily = 'JetBrains Mono';
|
||||
String _fontFamily = 'System';
|
||||
|
||||
String get theme => _theme;
|
||||
String get themeDark => _themeDark;
|
||||
|
||||
Reference in New Issue
Block a user