Styles for headings, paragraphs, lists…etc
h1Large
'Taxing Laughter: The Joke Tax Chronicles' ,
style : ShadTheme . of (context).textTheme.h1Large,
h1
'Taxing Laughter: The Joke Tax Chronicles' ,
style : ShadTheme . of (context).textTheme.h1,
h2
'The People of the Kingdom' ,
style : ShadTheme . of (context).textTheme.h2,
h3
style : ShadTheme . of (context).textTheme.h3,
h4
'The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.' ,
style : ShadTheme . of (context).textTheme.h4,
p
'The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.' ,
style : ShadTheme . of (context).textTheme.p,
Blockquote
'"After all," he said, "everyone enjoys a good joke, so it \' s only fair that they should pay for the privilege."' ,
style : ShadTheme . of (context).textTheme.blockquote,
Table
style : ShadTheme . of (context).textTheme.table,
List
'1st level of puns: 5 gold coins' ,
style : ShadTheme . of (context).textTheme.list,
Lead
'A modal dialog that interrupts the user with important content and expects a response.' ,
style : ShadTheme . of (context).textTheme.lead,
Large
'Are you absolutely sure?' ,
style : ShadTheme . of (context).textTheme.large,
Small
style : ShadTheme . of (context).textTheme.small,
Muted
'Enter your email address.' ,
style : ShadTheme . of (context).textTheme.muted,
Custom font family
By default Shadcn UI uses Geist as default font family.
To change it, add the local font to your project, for example in the /fonts
directory.
Then update your pubspec.yaml
with something like this:
- asset : fonts/UbuntuMono-Regular.ttf
- asset : fonts/UbuntuMono-Italic.ttf
- asset : fonts/UbuntuMono-Bold.ttf
- asset : fonts/UbuntuMono-BoldItalic.ttf
Then in your ShadApp
update the ShadTextTheme
:
debugShowCheckedModeBanner : false ,
brightness : Brightness .light,
colorScheme : const ShadZincColorScheme . light (),
textTheme : ShadTextTheme (
colorScheme : const ShadZincColorScheme . light (),
Google font
Install the google_fonts package.
Then add the google font to your ShadApp
:
debugShowCheckedModeBanner : false ,
brightness : Brightness .light,
colorScheme : const ShadZincColorScheme . light (),
textTheme : ShadTextTheme . fromGoogleFont (
colorScheme : const ShadZincColorScheme . light (),