diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart index af150e2f75f..0cfd990d689 100644 --- a/packages/flutter/lib/src/material/floating_action_button.dart +++ b/packages/flutter/lib/src/material/floating_action_button.dart @@ -9,7 +9,6 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'button.dart'; -import 'colors.dart'; import 'floating_action_button_theme.dart'; import 'scaffold.dart'; import 'theme.dart'; @@ -242,11 +241,6 @@ class FloatingActionButton extends StatelessWidget { /// [ThemeData.floatingActionButtonTheme] is used. If that property is also /// null, then the [ColorScheme.onSecondary] color of [ThemeData.colorScheme] /// is used. - /// - /// Although the color of theme's `accentIconTheme` currently provides a - /// default that supersedes the `onSecondary` color, this dependency - /// has been deprecated: https://flutter.dev/go/remove-fab-accent-theme-dependency. - /// It will be removed in the future. final Color? foregroundColor; /// The button's background color. @@ -429,25 +423,6 @@ class FloatingActionButton extends StatelessWidget { final ThemeData theme = Theme.of(context); final FloatingActionButtonThemeData floatingActionButtonTheme = theme.floatingActionButtonTheme; - // Applications should no longer use accentIconTheme's color to configure - // the foreground color of floating action buttons. For more information, see - // https://flutter.dev/go/remove-fab-accent-theme-dependency. - if (this.foregroundColor == null && floatingActionButtonTheme.foregroundColor == null) { - final bool accentIsDark = theme.accentColorBrightness == Brightness.dark; - final Color defaultAccentIconThemeColor = accentIsDark ? Colors.white : Colors.black; - if (theme.accentIconTheme.color != defaultAccentIconThemeColor) { - debugPrint( - 'Warning: ' - 'The support for configuring the foreground color of ' - 'FloatingActionButtons using ThemeData.accentIconTheme ' - 'has been deprecated. Please use ThemeData.floatingActionButtonTheme ' - 'instead. See ' - 'https://flutter.dev/go/remove-fab-accent-theme-dependency. ' - 'This feature was deprecated after v1.13.2.' - ); - } - } - final Color foregroundColor = this.foregroundColor ?? floatingActionButtonTheme.foregroundColor ?? theme.colorScheme.onSecondary;