google_language_fonts 0.1.1 copy "google_language_fonts: ^0.1.1" to clipboard
google_language_fonts: ^0.1.1 copied to clipboard

outdated

A package to include languages with fonts from fonts.google.com in your Flutter app.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:google_language_fonts/google_fonts.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    final TextStyle display1 = Theme.of(context).textTheme.headline4;

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Say no more to:\n',
              style: CyrillicFonts.robotoCondensed(textStyle: display1),
            ),
            Text(
              '❌ řčažťt ❌\n\n',
              style: GoogleFonts.getFont('Kosugi Maru', textStyle: display1),
            ),
            Text(
              '✅ नमस्कार',
              style: DevanagariFonts.hind(textStyle: display1),
            ),
            Text(
              '✅ Здравствуйте',
              style: CyrillicFonts.robotoCondensed(textStyle: display1),
            ),
            Text(
              '✅️  مرحبا',
              style: ArabicFonts.mada(textStyle: display1),
            ),
            Text(
              '✅ žluťoučký',
              style: LatinExtFonts.playfairDisplay(textStyle: display1),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ),
    );
  }
}
15
likes
40
points
121
downloads

Publisher

unverified uploader

Weekly Downloads

A package to include languages with fonts from fonts.google.com in your Flutter app.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

crypto, flutter, http, path, path_provider, pedantic

More

Packages that depend on google_language_fonts