fix: refactor Stepper.controlsBuilder to use ControlsDetails (#88538)
* changed controlsBuilder signature combined all parameters into ControlsDetails class * sample fixes * updates to docstrings * switched to positional argument for stepper.controlsbuilder * Merge branch 'master' into stepper-builder-fix
This commit is contained in:
@@ -49,16 +49,15 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Stepper(
|
||||
controlsBuilder: (BuildContext context,
|
||||
{VoidCallback? onStepContinue, VoidCallback? onStepCancel}) {
|
||||
controlsBuilder: (BuildContext context, ControlsDetails details) {
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
TextButton(
|
||||
onPressed: onStepContinue,
|
||||
onPressed: details.onStepContinue,
|
||||
child: const Text('NEXT'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: onStepCancel,
|
||||
onPressed: details.onStepCancel,
|
||||
child: const Text('CANCEL'),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user