mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Update FAB M3 token template class to new naming scheme and fix a typo in card.dart
(#102654)
This commit is contained in:
parent
dd65b6ba5b
commit
a8c16a7059
@ -13,8 +13,8 @@ class FABTemplate extends TokenTemplate {
|
|||||||
@override
|
@override
|
||||||
String generate() => '''
|
String generate() => '''
|
||||||
// Generated version ${tokens["version"]}
|
// Generated version ${tokens["version"]}
|
||||||
class _M3Defaults extends FloatingActionButtonThemeData {
|
class _TokenDefaultsM3 extends FloatingActionButtonThemeData {
|
||||||
_M3Defaults(this.context, this.type, this.hasChild)
|
_TokenDefaultsM3(this.context, this.type, this.hasChild)
|
||||||
: super(
|
: super(
|
||||||
elevation: ${elevation("md.comp.fab.primary.container")},
|
elevation: ${elevation("md.comp.fab.primary.container")},
|
||||||
focusElevation: ${elevation("md.comp.fab.primary.focus.container")},
|
focusElevation: ${elevation("md.comp.fab.primary.focus.container")},
|
||||||
|
@ -90,8 +90,8 @@ class Card extends StatelessWidget {
|
|||||||
|
|
||||||
/// The color used as an overlay on [color] to indicate elevation.
|
/// The color used as an overlay on [color] to indicate elevation.
|
||||||
///
|
///
|
||||||
/// If this is null, no overlay will be applied. Otherwise the this
|
/// If this is null, no overlay will be applied. Otherwise this color
|
||||||
/// color will be composited on top of [color] with an opacity related
|
/// will be composited on top of [color] with an opacity related
|
||||||
/// to [elevation] and used to paint the background of the card.
|
/// to [elevation] and used to paint the background of the card.
|
||||||
///
|
///
|
||||||
/// The default is null.
|
/// The default is null.
|
||||||
|
@ -509,7 +509,7 @@ class FloatingActionButton extends StatelessWidget {
|
|||||||
final ThemeData theme = Theme.of(context);
|
final ThemeData theme = Theme.of(context);
|
||||||
final FloatingActionButtonThemeData floatingActionButtonTheme = theme.floatingActionButtonTheme;
|
final FloatingActionButtonThemeData floatingActionButtonTheme = theme.floatingActionButtonTheme;
|
||||||
final FloatingActionButtonThemeData defaults = theme.useMaterial3
|
final FloatingActionButtonThemeData defaults = theme.useMaterial3
|
||||||
? _M3Defaults(context, _floatingActionButtonType, child != null)
|
? _TokenDefaultsM3(context, _floatingActionButtonType, child != null)
|
||||||
: _M2Defaults(context, _floatingActionButtonType, child != null);
|
: _M2Defaults(context, _floatingActionButtonType, child != null);
|
||||||
|
|
||||||
final Color foregroundColor = this.foregroundColor
|
final Color foregroundColor = this.foregroundColor
|
||||||
@ -783,8 +783,8 @@ class _M2Defaults extends FloatingActionButtonThemeData {
|
|||||||
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
|
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
|
||||||
|
|
||||||
// Generated version v0_92
|
// Generated version v0_92
|
||||||
class _M3Defaults extends FloatingActionButtonThemeData {
|
class _TokenDefaultsM3 extends FloatingActionButtonThemeData {
|
||||||
_M3Defaults(this.context, this.type, this.hasChild)
|
_TokenDefaultsM3(this.context, this.type, this.hasChild)
|
||||||
: super(
|
: super(
|
||||||
elevation: 6.0,
|
elevation: 6.0,
|
||||||
focusElevation: 6.0,
|
focusElevation: 6.0,
|
||||||
|
Loading…
Reference in New Issue
Block a user