How to use available browser fonts in a Flutter web app

Viewed 149

I'd like to use fonts that are available in the browser, like all the standard font families. But specifying the font family isn't changing my fonts.

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'flutter web app',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        textTheme: TextTheme(bodyText2: TextStyle(fontFamily: 'Courier New'))

      ),
      home: HomeView(),
    );
  }
}

How do I use available fonts without having to download and add the fonts to the project?

1 Answers
Related