google_fonts 6.3.2 copy "google_fonts: ^6.3.2" to clipboard
google_fonts: ^6.3.2 copied to clipboard

A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.

example/lib/main.dart

// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'package:flutter/material.dart';

import 'example_font_selection.dart';
import 'example_simple.dart';

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData.light(useMaterial3: true),
      home: DefaultTabController(
        animationDuration: Duration.zero,
        length: 2,
        child: Scaffold(
          appBar: AppBar(
            title: const Text('Google Fonts Demo'),
            bottom: const TabBar(
              tabs: <Widget>[Tab(text: 'Simple'), Tab(text: 'Select a font')],
            ),
          ),
          body: const TabBarView(
            children: <Widget>[ExampleSimple(), ExampleFontSelection()],
          ),
        ),
      ),
    );
  }
}
6.29k
likes
150
points
2.26M
downloads
screenshot

Publisher

verified publisherflutter.dev

Weekly Downloads

A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.

Repository (GitHub)
View/report issues
Contributing

Topics

#font #fonts

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

crypto, flutter, http, path_provider

More

Packages that depend on google_fonts