@@ -345,50 +345,6 @@ class FilledButton extends ButtonStyleButton {
345345 /// shape's [OutlinedBorder.side] . Typically the default value of an
346346 /// [OutlinedBorder] 's side is [BorderSide.none] , so an outline is not drawn.
347347 ///
348- /// ## Material 3 defaults
349- ///
350- /// If [ThemeData.useMaterial3] is set to true the following defaults will
351- /// be used:
352- ///
353- /// * `textStyle` - Theme.textTheme.labelLarge
354- /// * `backgroundColor`
355- /// * disabled - Theme.colorScheme.onSurface(0.12)
356- /// * others - Theme.colorScheme.secondaryContainer
357- /// * `foregroundColor`
358- /// * disabled - Theme.colorScheme.onSurface(0.38)
359- /// * others - Theme.colorScheme.onSecondaryContainer
360- /// * `overlayColor`
361- /// * hovered - Theme.colorScheme.onSecondaryContainer(0.08)
362- /// * focused or pressed - Theme.colorScheme.onSecondaryContainer(0.12)
363- /// * `shadowColor` - Theme.colorScheme.shadow
364- /// * `surfaceTintColor` - Colors.transparent
365- /// * `elevation`
366- /// * disabled - 0
367- /// * default - 1
368- /// * hovered - 3
369- /// * focused or pressed - 1
370- /// * `padding`
371- /// * `textScaleFactor <= 1` - horizontal(24)
372- /// * `1 < textScaleFactor <= 2` - lerp(horizontal(24), horizontal(12))
373- /// * `2 < textScaleFactor <= 3` - lerp(horizontal(12), horizontal(6))
374- /// * `3 < textScaleFactor` - horizontal(6)
375- /// * `minimumSize` - Size(64, 40)
376- /// * `fixedSize` - null
377- /// * `maximumSize` - Size.infinite
378- /// * `side` - null
379- /// * `shape` - StadiumBorder()
380- /// * `mouseCursor`
381- /// * disabled - SystemMouseCursors.basic
382- /// * others - SystemMouseCursors.click
383- /// * `visualDensity` - Theme.visualDensity
384- /// * `tapTargetSize` - Theme.materialTapTargetSize
385- /// * `animationDuration` - kThemeChangeDuration
386- /// * `enableFeedback` - true
387- /// * `alignment` - Alignment.center
388- /// * `splashFactory` - Theme.splashFactory
389- ///
390- /// For the [FilledButton.icon] factory, the start (generally the left) value of
391- /// [padding] is reduced from 24 to 16.
392348 @override
393349 ButtonStyle defaultStyleOf (BuildContext context) {
394350 switch (_variant) {
@@ -408,12 +364,10 @@ class FilledButton extends ButtonStyleButton {
408364}
409365
410366EdgeInsetsGeometry _scaledPadding (BuildContext context) {
411- final bool useMaterial3 = Theme .of (context).useMaterial3;
412- final double padding1x = useMaterial3 ? 24.0 : 16.0 ;
413367 return ButtonStyleButton .scaledPadding (
414- EdgeInsets .symmetric (horizontal: padding1x ),
415- EdgeInsets .symmetric (horizontal: padding1x / 2 ),
416- EdgeInsets .symmetric (horizontal: padding1x / 2 / 2 ),
368+ const EdgeInsets .symmetric (horizontal: 16 ),
369+ const EdgeInsets .symmetric (horizontal: 8 ),
370+ const EdgeInsets .symmetric (horizontal: 4 ),
417371 MediaQuery .textScaleFactorOf (context),
418372 );
419373}
@@ -509,13 +463,7 @@ class _FilledButtonWithIcon extends FilledButton {
509463
510464 @override
511465 ButtonStyle defaultStyleOf (BuildContext context) {
512- final bool useMaterial3 = Theme .of (context).useMaterial3;
513- final EdgeInsetsGeometry scaledPadding = useMaterial3 ? ButtonStyleButton .scaledPadding (
514- const EdgeInsetsDirectional .fromSTEB (16 , 0 , 24 , 0 ),
515- const EdgeInsetsDirectional .fromSTEB (8 , 0 , 12 , 0 ),
516- const EdgeInsetsDirectional .fromSTEB (4 , 0 , 6 , 0 ),
517- MediaQuery .textScaleFactorOf (context),
518- ) : ButtonStyleButton .scaledPadding (
466+ final EdgeInsetsGeometry scaledPadding = ButtonStyleButton .scaledPadding (
519467 const EdgeInsetsDirectional .fromSTEB (12 , 0 , 16 , 0 ),
520468 const EdgeInsets .symmetric (horizontal: 8 ),
521469 const EdgeInsetsDirectional .fromSTEB (8 , 0 , 4 , 0 ),
0 commit comments