flutter_font_finder 0.0.3 copy "flutter_font_finder: ^0.0.3" to clipboard
flutter_font_finder: ^0.0.3 copied to clipboard

A widget to help you find your favorite flutter font.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_font_finder/flutter_font_finder.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

void main() {
  runApp(
    const ProviderScope(
      child: MyApp(),
    ),
  );
}

class MyApp extends ConsumerWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        textTheme: ref.watch(currentFontProvider),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const FontSel(),
          toolbarHeight: 125,
        ),
        body: Center(
            child: Padding(
          padding: const EdgeInsets.all(20.0),
          child: Text(
            'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
            style: Theme.of(context).textTheme.headlineSmall,
          ),
        )));
  }
}
3
likes
115
pub points
0%
popularity

Publisher

unverified uploader

A widget to help you find your favorite flutter font.

Repository (GitHub)
View/report issues

Documentation

API reference

License

CC0-1.0 (license)

Dependencies

flutter, flutter_riverpod, freezed_annotation, google_fonts, riverpod_annotation, share_plus

More

Packages that depend on flutter_font_finder