diff --git a/fonts/Inter-Black.ttf b/fonts/Inter-Black.ttf new file mode 100644 index 00000000..37742709 Binary files /dev/null and b/fonts/Inter-Black.ttf differ diff --git a/fonts/Inter-Bold.ttf b/fonts/Inter-Bold.ttf new file mode 100644 index 00000000..76a215cc Binary files /dev/null and b/fonts/Inter-Bold.ttf differ diff --git a/fonts/Inter-ExtraBold.ttf b/fonts/Inter-ExtraBold.ttf new file mode 100644 index 00000000..7ae3a4e8 Binary files /dev/null and b/fonts/Inter-ExtraBold.ttf differ diff --git a/fonts/Inter-ExtraLight.ttf b/fonts/Inter-ExtraLight.ttf new file mode 100644 index 00000000..131929e5 Binary files /dev/null and b/fonts/Inter-ExtraLight.ttf differ diff --git a/fonts/Inter-Light.ttf b/fonts/Inter-Light.ttf new file mode 100644 index 00000000..b9c460dc Binary files /dev/null and b/fonts/Inter-Light.ttf differ diff --git a/fonts/Inter-Medium.ttf b/fonts/Inter-Medium.ttf new file mode 100644 index 00000000..06ae9e9c Binary files /dev/null and b/fonts/Inter-Medium.ttf differ diff --git a/fonts/Inter-Regular.ttf b/fonts/Inter-Regular.ttf new file mode 100644 index 00000000..cc73944a Binary files /dev/null and b/fonts/Inter-Regular.ttf differ diff --git a/fonts/Inter-SemiBold.ttf b/fonts/Inter-SemiBold.ttf new file mode 100644 index 00000000..278ceaa3 Binary files /dev/null and b/fonts/Inter-SemiBold.ttf differ diff --git a/fonts/Inter-Thin.ttf b/fonts/Inter-Thin.ttf new file mode 100644 index 00000000..e12ed497 Binary files /dev/null and b/fonts/Inter-Thin.ttf differ diff --git a/lib/api/irc_api.dart b/lib/api/irc_api.dart index e8f14025..4981cb86 100644 --- a/lib/api/irc_api.dart +++ b/lib/api/irc_api.dart @@ -1,7 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/widgets.dart'; import 'package:frosty/models/irc.dart'; -import 'package:google_fonts/google_fonts.dart'; class IRC { /// Applies the given CLEARCHAT message to the given list of messages. @@ -115,7 +114,7 @@ class IRC { span.add( TextSpan( text: ircMessage.tags['display-name']!, - style: GoogleFonts.inter( + style: TextStyle( color: HexColor.fromHex(ircMessage.tags['color'] ?? '#868686'), fontWeight: FontWeight.bold, ), diff --git a/lib/main.dart b/lib/main.dart index 781b7727..8c715067 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,7 +6,6 @@ import 'package:frosty/stores/auth_store.dart'; import 'package:frosty/stores/stream_list_store.dart'; import 'package:frosty/stores/home_store.dart'; import 'package:frosty/stores/settings_store.dart'; -import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; void main() { @@ -29,26 +28,28 @@ class MyApp extends StatelessWidget { title: 'Frosty', theme: ThemeData( primarySwatch: Colors.deepPurple, - fontFamily: GoogleFonts.inter().fontFamily, + fontFamily: 'Inter', splashFactory: Platform.isIOS ? NoSplash.splashFactory : null, - appBarTheme: AppBarTheme( - titleTextStyle: GoogleFonts.inter(fontSize: 20, fontWeight: FontWeight.bold), + appBarTheme: const AppBarTheme( + titleTextStyle: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), ), ), darkTheme: ThemeData.dark().copyWith( - scaffoldBackgroundColor: Colors.black, - splashFactory: Platform.isIOS ? NoSplash.splashFactory : null, - textTheme: ThemeData.dark().textTheme.apply(fontFamily: GoogleFonts.inter().fontFamily), - colorScheme: ColorScheme.fromSwatch( - primarySwatch: Colors.deepPurple, + scaffoldBackgroundColor: Colors.black, + splashFactory: Platform.isIOS ? NoSplash.splashFactory : null, + textTheme: ThemeData.dark().textTheme.apply(fontFamily: 'Inter'), + appBarTheme: const AppBarTheme( + color: Colors.black, + titleTextStyle: TextStyle( + fontFamily: 'Inter', + fontSize: 28, + fontWeight: FontWeight.bold, ), - appBarTheme: AppBarTheme( - color: Colors.black, - titleTextStyle: GoogleFonts.inter(fontSize: 28, fontWeight: FontWeight.bold), - ), - bottomNavigationBarTheme: const BottomNavigationBarThemeData( - backgroundColor: Colors.black, - )), + ), + bottomNavigationBarTheme: const BottomNavigationBarThemeData( + backgroundColor: Colors.black, + ), + ), home: Scaffold( body: FutureBuilder( future: Future.wait([ diff --git a/lib/screens/video_chat.dart b/lib/screens/video_chat.dart index f5cc5869..92a33069 100644 --- a/lib/screens/video_chat.dart +++ b/lib/screens/video_chat.dart @@ -8,7 +8,6 @@ import 'package:frosty/stores/settings_store.dart'; import 'package:frosty/stores/video_store.dart'; import 'package:frosty/widgets/chat.dart'; import 'package:frosty/widgets/video.dart'; -import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; class VideoChat extends StatelessWidget { @@ -31,7 +30,8 @@ class VideoChat extends StatelessWidget { return AspectRatio( aspectRatio: 16 / 9, child: Video( - channelName: userLogin, + userLogin: userLogin, + userName: userName, videoStore: VideoStore(), settingsStore: context.read(), ), @@ -40,7 +40,7 @@ class VideoChat extends StatelessWidget { return AppBar( title: Text( userName, - style: GoogleFonts.inter(fontSize: 20, fontWeight: FontWeight.bold), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), ), actions: [ IconButton( diff --git a/lib/widgets/stream_card.dart b/lib/widgets/stream_card.dart index 2d384b62..14155030 100644 --- a/lib/widgets/stream_card.dart +++ b/lib/widgets/stream_card.dart @@ -2,7 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:frosty/models/stream.dart'; import 'package:frosty/screens/video_chat.dart'; -import 'package:google_fonts/google_fonts.dart'; import 'package:intl/intl.dart'; /// A tappable card widget that displays a stream's thumbnail and details. @@ -50,7 +49,7 @@ class StreamCard extends StatelessWidget { children: [ Text( streamInfo.userName, - style: GoogleFonts.inter(fontSize: 16, fontWeight: FontWeight.bold), + style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold), ), const SizedBox(height: 5), SingleChildScrollView( diff --git a/pubspec.lock b/pubspec.lock index 1cdf04cc..0cad75ce 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -324,13 +324,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.2" - google_fonts: - dependency: "direct main" - description: - name: google_fonts - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" graphs: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c3a5dda3..551a25de 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -46,7 +46,6 @@ dependencies: mobx: ^2.0.0 flutter_mobx: ^2.0.0 shared_preferences: ^2.0.8 - google_fonts: ^2.1.0 dev_dependencies: flutter_test: @@ -73,6 +72,19 @@ flutter: # the material Icons class. uses-material-design: true + fonts: + - family: Inter + fonts: + - asset: fonts/Inter-Thin.ttf + - asset: fonts/Inter-ExtraLight.ttf + - asset: fonts/Inter-Light.ttf + - asset: fonts/Inter-Regular.ttf + - asset: fonts/Inter-Medium.ttf + - asset: fonts/Inter-SemiBold.ttf + - asset: fonts/Inter-Bold.ttf + - asset: fonts/Inter-ExtraBold.ttf + - asset: fonts/Inter-Black.ttf + # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg