Skip to content

h-unterp/flutter_font_finder

Repository files navigation

Flutter Font Finder

A tool to help you find the font you want to use in your Flutter app.

Features

  1. Enables iterative process to continually refine your list of favorite fonts until you find the right one.
  2. Like or unlike fonts in current list.
  3. Save likes as a list and then refine that list and save it again...and repeat.
  4. Switch between lists, state is saved (as long as app is not closed)
  5. 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. Make sure to set toolbarHeight:125 otherwise the widget will be cut off. 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,
        ),

About

A flutter widget to help you find the best font for you

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published