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
724c0eb6
Unverified
Commit
724c0eb6
authored
Aug 10, 2021
by
Viren Khatri
Committed by
GitHub
Aug 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing ElevatedButton.child to be non-nullable (#87901)
parent
7d76a827
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
elevated_button.dart
packages/flutter/lib/src/material/elevated_button.dart
+1
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+2
-2
material_test.dart
packages/flutter/test/material/material_test.dart
+1
-1
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+3
-3
No files found.
packages/flutter/lib/src/material/elevated_button.dart
View file @
724c0eb6
...
...
@@ -96,7 +96,7 @@ class ElevatedButton extends ButtonStyleButton {
FocusNode
?
focusNode
,
bool
autofocus
=
false
,
Clip
clipBehavior
=
Clip
.
none
,
required
Widget
?
child
,
required
Widget
child
,
})
:
super
(
key:
key
,
onPressed:
onPressed
,
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
724c0eb6
...
...
@@ -7157,7 +7157,7 @@ class IgnorePointer extends SingleChildRenderObjectWidget {
/// height: 100.0,
/// child: ElevatedButton(
/// onPressed: () {},
/// child:
null
,
/// child:
const Text('Lower')
,
/// ),
/// ),
/// SizedBox(
...
...
@@ -7170,7 +7170,7 @@ class IgnorePointer extends SingleChildRenderObjectWidget {
/// primary: Colors.blue.shade200,
/// ),
/// onPressed: () {},
/// child:
null
,
/// child:
const Text('Upper')
,
/// ),
/// ),
/// ),
...
...
packages/flutter/test/material/material_test.dart
View file @
724c0eb6
...
...
@@ -244,7 +244,7 @@ void main() {
onPressed:
()
{
pressed
=
true
;
},
child:
null
,
child:
const
Text
(
'Button'
)
,
),
const
Material
(
type:
MaterialType
.
transparency
,
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
724c0eb6
...
...
@@ -287,7 +287,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
GlobalKey
topButtonKey
=
GlobalKey
();
Widget
selectButtonBuilder
(
BuildContext
context
,
VoidCallback
onPressed
)
{
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
selectButtonKey
,
child:
null
));
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
selectButtonKey
,
child:
const
Text
(
'Button'
)
));
}
// State type is private, hence using dynamic.
dynamic
getInspectorState
()
=>
inspectorKey
.
currentState
;
...
...
@@ -390,7 +390,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
GlobalKey
inspectorKey
=
GlobalKey
();
Widget
selectButtonBuilder
(
BuildContext
context
,
VoidCallback
onPressed
)
{
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
selectButtonKey
,
child:
null
));
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
selectButtonKey
,
child:
const
Text
(
'Button'
)
));
}
// State type is private, hence using dynamic.
dynamic
getInspectorState
()
=>
inspectorKey
.
currentState
;
...
...
@@ -590,7 +590,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
InspectorSelectButtonBuilder
selectButtonBuilder
(
Key
key
)
{
return
(
BuildContext
context
,
VoidCallback
onPressed
)
{
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
key
,
child:
null
));
return
Material
(
child:
ElevatedButton
(
onPressed:
onPressed
,
key:
key
,
child:
const
Text
(
'Button'
)
));
};
}
...
...
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