Add scalable font size support for buttons and split buttons based on size
This commit is contained in:
parent
b4ccdd7750
commit
1cb404b4df
3 changed files with 54 additions and 3 deletions
|
|
@ -128,3 +128,24 @@ class M3ETypography {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ButtonFontSize {
|
||||
final double xs;
|
||||
final double sm;
|
||||
final double md;
|
||||
final double lg;
|
||||
final double xl;
|
||||
|
||||
const ButtonFontSize({
|
||||
this.xs = 14,
|
||||
this.sm = 14,
|
||||
this.md = 16,
|
||||
this.lg = 20,
|
||||
this.xl = 24,
|
||||
});
|
||||
}
|
||||
|
||||
extension M3EButtonFontSizeExt on M3ETypography {
|
||||
ButtonFontSize get buttonFontSize => const ButtonFontSize();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue