
Flexible way of customizing text.

Add the dependency to your pubspec.yaml :
dependencies:
sleek_typography: <version> Column(
children: <Widget>[
SleekText("Basic", style: SleekTextStyle.bold5()),
SleekText("Style", style: SleekTextStyle.subtitle4()),
SleekContent.small(
child: Column(
children: <Widget>[
SleekText("Title", style: SleekTextStyle.title()),
SleekText("Body", style: SleekTextStyle.body()),
SleekText("Link", style: SleekTextStyle.link()),
],
),
),
],
)You can define four kind of presets :
1 to 10) : font sizeslight, normal, medium, bold) : font weightsprimary, secondary, monospace, code) : font familiesnone,caption,code,blockquote,body,link,button,subtitle,title) : a set of common styling option combinaisons.SleekTypography(
data: SleekTypographyData(
sizes: <see example>
weights: <see example>
families: <see example>
styles: <see example>
),
child: <your app>,
)For a complete definition example, see the default definition.
Typography can be updated from wherever in the tree. This may be usefull to be responsive : adapting content size when MediaQuery.size changes for example.
SleekTypography.update(context, SleekTypographyData(
sizes: <see example>
weights: <see example>
families: <see example>
styles: <see example>
),
);SleekText("hello" style: SleekStyle.normal())Basic types let you choose a combination of a weight and a size.

SleekText("hello" style: SleekStyle.normal3())
SleekText("hello" style: SleekStyle.medium3())
SleekText("hello" style: SleekStyle.bold3())
SleekText("hello" style: SleekStyle.light3())Each predefined style has 6 levels and are defined by a combination of size, weight or even a widget builder around. They are built to be coherent with corresponding levels (for example, a title will always have a bigger font than a body for a corresponding level).

SleekText("hello" style: SleekStyle.body3())
SleekText("hello" style: SleekStyle.title3())
SleekText("hello" style: SleekStyle.subtitle3())
SleekText("hello" style: SleekStyle.link3())
SleekText("hello" style: SleekStyle.blockquote3())
SleekText("hello" style: SleekStyle.code3())
SleekText("hello" style: SleekStyle.caption3())Content let you define a default predefined level for all its descendants.

SleekContent.small(
child: Column(
children: <Widget>[
SleekText("title" style: SleekStyle.title()),
SleekText("body" style: SleekStyle.body()),
SleekText("caption" style: SleekStyle.caption()),
]
)
)
SleekContent.normal(
child: Column(
children: <Widget>[
SleekText("title" style: SleekStyle.title()),
SleekText("body" style: SleekStyle.body()),
SleekText("caption" style: SleekStyle.caption()),
]
)
)
SleekContent.big(
child: Column(
children: <Widget>[
SleekText("title" style: SleekStyle.title()),
SleekText("body" style: SleekStyle.body()),
SleekText("caption" style: SleekStyle.caption()),
]
)
)Thanks to the bulma framework team for the inspiration.