Add Dialog.fullscreen and example (#112261)
This commit is contained in:
@@ -120,6 +120,7 @@ Future<void> main(List<String> args) async {
|
||||
ButtonTemplate('md.comp.text-button', 'TextButton', '$materialLib/text_button.dart', tokens).updateFile();
|
||||
CardTemplate('Card', '$materialLib/card.dart', tokens).updateFile();
|
||||
CheckboxTemplate('Checkbox', '$materialLib/checkbox.dart', tokens).updateFile();
|
||||
DialogFullscreenTemplate('DialogFullscreen', '$materialLib/dialog.dart', tokens).updateFile();
|
||||
DialogTemplate('Dialog', '$materialLib/dialog.dart', tokens).updateFile();
|
||||
FABTemplate('FAB', '$materialLib/floating_action_button.dart', tokens).updateFile();
|
||||
FilterChipTemplate('ChoiceChip', '$materialLib/choice_chip.dart', tokens).updateFile();
|
||||
|
||||
@@ -47,3 +47,19 @@ class _${blockName}DefaultsM3 extends DialogTheme {
|
||||
}
|
||||
''';
|
||||
}
|
||||
|
||||
class DialogFullscreenTemplate extends TokenTemplate {
|
||||
const DialogFullscreenTemplate(super.blockName, super.fileName, super.tokens);
|
||||
|
||||
@override
|
||||
String generate() => '''
|
||||
class _${blockName}DefaultsM3 extends DialogTheme {
|
||||
const _${blockName}DefaultsM3(this.context);
|
||||
|
||||
final BuildContext context;
|
||||
|
||||
@override
|
||||
Color? get backgroundColor => ${componentColor("md.comp.full-screen-dialog.container")};
|
||||
}
|
||||
''';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user