Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5ab34744
Unverified
Commit
5ab34744
authored
Mar 16, 2021
by
Darren Austin
Committed by
GitHub
Mar 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the last vestiges of accent color from the FloatingActionButton. (#78296)
parent
93fb2586
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
25 deletions
+0
-25
floating_action_button.dart
...ages/flutter/lib/src/material/floating_action_button.dart
+0
-25
No files found.
packages/flutter/lib/src/material/floating_action_button.dart
View file @
5ab34744
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment