mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This reverts commit 724c0eb65cef6a66241f9f1500dc9ed53991d5be.
This commit is contained in:
parent
e127665795
commit
871386bbb4
@ -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,
|
||||
|
||||
@ -7157,7 +7157,7 @@ class IgnorePointer extends SingleChildRenderObjectWidget {
|
||||
/// height: 100.0,
|
||||
/// child: ElevatedButton(
|
||||
/// onPressed: () {},
|
||||
/// child: const Text('Lower'),
|
||||
/// child: null,
|
||||
/// ),
|
||||
/// ),
|
||||
/// SizedBox(
|
||||
@ -7170,7 +7170,7 @@ class IgnorePointer extends SingleChildRenderObjectWidget {
|
||||
/// primary: Colors.blue.shade200,
|
||||
/// ),
|
||||
/// onPressed: () {},
|
||||
/// child: const Text('Upper'),
|
||||
/// child: null,
|
||||
/// ),
|
||||
/// ),
|
||||
/// ),
|
||||
|
||||
@ -244,7 +244,7 @@ void main() {
|
||||
onPressed: () {
|
||||
pressed = true;
|
||||
},
|
||||
child: const Text('Button'),
|
||||
child: null,
|
||||
),
|
||||
const Material(
|
||||
type: MaterialType.transparency,
|
||||
|
||||
@ -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: const Text('Button')));
|
||||
return Material(child: ElevatedButton(onPressed: onPressed, key: selectButtonKey, child: null));
|
||||
}
|
||||
// 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: const Text('Button')));
|
||||
return Material(child: ElevatedButton(onPressed: onPressed, key: selectButtonKey, child: null));
|
||||
}
|
||||
// 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: const Text('Button')));
|
||||
return Material(child: ElevatedButton(onPressed: onPressed, key: key, child: null));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user