flutter_font_finder 0.0.3
flutter_font_finder: ^0.0.3 copied to clipboard
A widget to help you find your favorite flutter font.
Flutter Font Finder #
A tool to help you find the font you want to use in your Flutter app.
![](https://github.com/h-unterp/flutter_font_finder/raw/main/img/readme.gif)
Features #
- Enables iterative process to continually refine your list of favorite fonts until you find the right one.
- Like or unlike fonts in current list.
- Save likes as a list and then refine that list and save it again...and repeat.
- Switch between lists, state is saved (as long as app is not closed)
- Export a font-list as JSON so that your developer/teammates can import the list (import not yet implemented).
Getting started #
See example for a working app.
in your pubspec.yaml
add the following dependencies:
flutter_riverpod: ^2.3.2
flutter_font_finder: ^0.0.1
In order to initialize riverpod for your app you will need to wrap your main widget with a ProviderScope
widget.
void main() {
runApp(
const ProviderScope(
child: MyApp(),
),
);
}
Next, under your MaterialApp
widget you will need to watch the currentFontProvider
which is imported via import 'package:flutter_font_finder/flutter_font_finder.dart';
MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
textTheme: ref.watch(currentFontProvider),
)
Finally, you will need to add a FontFinder
widget to your app. This widget will allow you to search for fonts and select the one you want to use. Here is one example:
Scaffold(
appBar: AppBar(
title: const FontSel(),
toolbarHeight: 125,
),