remote_fonts 1.1.4 copy "remote_fonts: ^1.1.4" to clipboard
remote_fonts: ^1.1.4 copied to clipboard

Fetch and load remote fonts during Flutter app runtime. Also has ability to cache previously loaded fonts.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:remote_fonts/remote_fonts.dart';

const _remoteFont = RemoteFont(
  family: 'Pacifico',
  assets: [
    RemoteFontAsset(
      'https://res.cloudinary.com/dwln2chzi/raw/upload/v1684216523/remote_fonts/Pacifico-Regular_n9wo0l.ttf',
    ),
  ],
);

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    RemoteFontsLoader.load([_remoteFont]);

    return const MaterialApp(
      title: 'Remote Fonts Example',
      home: Scaffold(
        body: Center(
          child: Text(
            'Hello, World!',
            style: TextStyle(
              fontFamily: 'Pacifico',
              fontSize: 40,
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
130
pub points
57%
popularity

Publisher

verified publishergopaul.me

Fetch and load remote fonts during Flutter app runtime. Also has ability to cache previously loaded fonts.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

crypto, flutter, http, path

More

Packages that depend on remote_fonts