forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
MaterialBanner
to support Material 3 (#105957)
- Loading branch information
1 parent
202f577
commit d8fdb83
Showing
8 changed files
with
400 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2014 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'template.dart'; | ||
|
||
class BannerTemplate extends TokenTemplate { | ||
const BannerTemplate(super.blockName, super.fileName, super.tokens); | ||
|
||
@override | ||
String generate() => ''' | ||
class _${blockName}DefaultsM3 extends MaterialBannerThemeData { | ||
const _${blockName}DefaultsM3(this.context) | ||
: super(elevation: ${elevation("md.comp.banner.container")}); | ||
final BuildContext context; | ||
@override | ||
Color? get backgroundColor => ${componentColor("md.comp.banner.container")}; | ||
@override | ||
Color? get surfaceTintColor => ${color("md.comp.banner.container.surface-tint-layer.color")}; | ||
@override | ||
Color? get dividerColor => ${color("md.comp.banner.divider.color")}; | ||
@override | ||
TextStyle? get contentTextStyle => ${textStyle("md.comp.banner.supporting-text")}; | ||
} | ||
'''; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.