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
51227a9a
Unverified
Commit
51227a9a
authored
Feb 08, 2023
by
Qun Cheng
Committed by
GitHub
Feb 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing parameters to `RadioListTile` (#120117)
parent
3a514175
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
486 additions
and
2 deletions
+486
-2
radio.dart
packages/flutter/lib/src/material/radio.dart
+3
-1
radio_list_tile.dart
packages/flutter/lib/src/material/radio_list_tile.dart
+65
-1
radio_list_tile_test.dart
packages/flutter/test/material/radio_list_tile_test.dart
+418
-0
No files found.
packages/flutter/lib/src/material/radio.dart
View file @
51227a9a
...
...
@@ -264,10 +264,12 @@ class Radio<T> extends StatefulWidget {
/// [ThemeData.focusColor] is used.
final
Color
?
focusColor
;
/// {@template flutter.material.radio.hoverColor}
/// The color for the radio's [Material] when a pointer is hovering over it.
///
/// If [overlayColor] returns a non-null color in the [MaterialState.hovered]
/// state, it will be used instead.
/// {@endtemplate}
///
/// If null, then the value of [RadioThemeData.overlayColor] is used in the
/// hovered state. If that is also null, then the value of
...
...
@@ -275,7 +277,7 @@ class Radio<T> extends StatefulWidget {
final
Color
?
hoverColor
;
/// {@template flutter.material.radio.overlayColor}
/// The color for the
checkbox
's [Material].
/// The color for the
radio
's [Material].
///
/// Resolves in the following states:
/// * [MaterialState.pressed].
...
...
packages/flutter/lib/src/material/radio_list_tile.dart
View file @
51227a9a
...
...
@@ -162,8 +162,14 @@ class RadioListTile<T> extends StatelessWidget {
required
this
.
value
,
required
this
.
groupValue
,
required
this
.
onChanged
,
this
.
mouseCursor
,
this
.
toggleable
=
false
,
this
.
activeColor
,
this
.
fillColor
,
this
.
hoverColor
,
this
.
overlayColor
,
this
.
splashRadius
,
this
.
materialTapTargetSize
,
this
.
title
,
this
.
subtitle
,
this
.
isThreeLine
=
false
,
...
...
@@ -220,6 +226,20 @@ class RadioListTile<T> extends StatelessWidget {
/// ```
final
ValueChanged
<
T
?>?
onChanged
;
/// The cursor for a mouse pointer when it enters or is hovering over the
/// widget.
///
/// If [mouseCursor] is a [MaterialStateProperty<MouseCursor>],
/// [MaterialStateProperty.resolve] is used for the following [MaterialState]s:
///
/// * [MaterialState.selected].
/// * [MaterialState.hovered].
/// * [MaterialState.disabled].
///
/// If null, then the value of [RadioThemeData.mouseCursor] is used.
/// If that is also null, then [MaterialStateMouseCursor.clickable] is used.
final
MouseCursor
?
mouseCursor
;
/// Set to true if this radio list tile is allowed to be returned to an
/// indeterminate state by selecting it again when selected.
///
...
...
@@ -250,6 +270,45 @@ class RadioListTile<T> extends StatelessWidget {
/// Defaults to [ColorScheme.secondary] of the current [Theme].
final
Color
?
activeColor
;
/// The color that fills the radio button.
///
/// Resolves in the following states:
/// * [MaterialState.selected].
/// * [MaterialState.hovered].
/// * [MaterialState.disabled].
///
/// If null, then the value of [activeColor] is used in the selected state. If
/// that is also null, then the value of [RadioThemeData.fillColor] is used.
/// If that is also null, then the default value is used.
final
MaterialStateProperty
<
Color
?>?
fillColor
;
/// {@macro flutter.material.radio.materialTapTargetSize}
///
/// Defaults to [MaterialTapTargetSize.shrinkWrap].
final
MaterialTapTargetSize
?
materialTapTargetSize
;
/// {@macro flutter.material.radio.hoverColor}
final
Color
?
hoverColor
;
/// The color for the radio's [Material].
///
/// Resolves in the following states:
/// * [MaterialState.pressed].
/// * [MaterialState.selected].
/// * [MaterialState.hovered].
///
/// If null, then the value of [activeColor] with alpha [kRadialReactionAlpha]
/// and [hoverColor] is used in the pressed and hovered state. If that is also
/// null, the value of [SwitchThemeData.overlayColor] is used. If that is
/// also null, then the default value is used in the pressed and hovered state.
final
MaterialStateProperty
<
Color
?>?
overlayColor
;
/// {@macro flutter.material.radio.splashRadius}
///
/// If null, then the value of [RadioThemeData.splashRadius] is used. If that
/// is also null, then [kRadialReactionRadius] is used.
final
double
?
splashRadius
;
/// The primary content of the list tile.
///
/// Typically a [Text] widget.
...
...
@@ -341,8 +400,13 @@ class RadioListTile<T> extends StatelessWidget {
onChanged:
onChanged
,
toggleable:
toggleable
,
activeColor:
activeColor
,
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
materialTapTargetSize:
materialTapTargetSize
??
MaterialTapTargetSize
.
shrinkWrap
,
autofocus:
autofocus
,
fillColor:
fillColor
,
mouseCursor:
mouseCursor
,
hoverColor:
hoverColor
,
overlayColor:
overlayColor
,
splashRadius:
splashRadius
,
);
Widget
?
leading
,
trailing
;
switch
(
controlAffinity
)
{
...
...
packages/flutter/test/material/radio_list_tile_test.dart
View file @
51227a9a
This diff is collapsed.
Click to expand it.
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