September 2019
Beginner
512 pages
12h 52m
English
The next step is to make the font active in the application. We can do that in the root theme inside a MaterialApp and CupertinoApp widget, or, if we prefer, we can add a font directly to a Text widget through its style property:
final lightTheme = ThemeData( fontFamily: "Ubuntu", primarySwatch: Colors.lightGreen, primaryColor: Colors.lightGreen.shade600, accentColor: Colors.orangeAccent.shade400, primaryColorBrightness: Brightness.dark, cardColor: Colors.lightGreen.shade100,);
Our app now uses the Ubuntu font family by default in all widgets that contain text. Remember, this behavior can be overridden in small sections of the app, if you prefer, by using Theme widgets or changing the style property ...
Read now
Unlock full access