title: How to customise Steppers in flutter and control through widgets in content?
body: <p>I created a sequence of steps in my view which I want to implement using the Stepper Widget in Flutter. However I want the steps to be triggered by widgets in the  content instead of Continue and Cancel. I tried to use controlsBuilder however that creates the same control widget for each step. In my requirement i want different widgets to trigger the flow. my first step is a yes-no question. Next Step should be controlled by whether there is an image in the view and so on. 
  How do i achieve this? </p>
  
  <p>Is there a way to create a custom Stepper bar and avoid the Stepper class altogether ? </p>
  
  <p>This is the flow i want to achieve with stepper :</p>
  
  <p><a href="https://ibb.co/KzJYGdQ" rel="noreferrer">https://ibb.co/KzJYGdQ</a></p>
  
  <p><a href="https://ibb.co/BsHZbHd" rel="noreferrer">https://ibb.co/BsHZbHd</a></p>
  
  <p>I tried the following code: </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class StepperView extends StatefulWidget{
    @override
    _stepperViewState createState() =&gt; _stepperViewState();
  }
  
  class _stepperViewState extends State&lt;StepperView&gt; {
  
    //bool itemBought = false;
  
    int _currentstep = 0;
    void _movetonext() {
      setState(() {
        if(_currentstep&lt; steps.length-1){
          _currentstep++;
        }
      });
    }
  
    void _movetostart() {
      setState(() {
        _currentstep = 0;
      });
    }
  
  
    List&lt;Step&gt; steps = [
      Step(
        title: Text("Item bought?"),
        content: Column(
    children: &lt;Widget&gt; [
    Row(
    children: &lt;Widget&gt;[
  
    GestureDetector(
    //onTap: _movetonext,
      // (GIVES ERROR: only static members can accessed in initializers )
    child: Container(decoration: BoxDecoration(border: Border.all(color: Colors.red, width: 1.0), borderRadius: BorderRadius.circular(20.0)),child: Center(
    child: Padding(
    padding: const EdgeInsets.only(top: 6.0, bottom: 6.0, left: 20.0, right: 20.0),
    child: Text('NO', style: TextStyle(color: Colors.red, fontSize: 9.0)),
    ),
    )),
    ),
    SizedBox(width: 10.0),
  
    GestureDetector(
   //onTap: _movetostart,
      // (GIVES ERROR: only static members can accessed in initializers )
    child: Container(decoration: BoxDecoration(color: Colors.red,border: Border.all(color: Colors.red, width: 1.0),borderRadius: BorderRadius.circular(20.0)),child: Center(
    child: Padding(
    padding: const EdgeInsets.only(top: 6.0, bottom: 6.0, left: 20.0, right: 20.0),
    child: Text('YES', style: TextStyle(color: Colors.white, fontSize: 9.0)),
    ),
    )),
    ),
  
    ])]),
        isActive: true,
      ),
  
      Step(
        title: Text("Step 2"),
        content: Text("this is the second step"),
        isActive: true,
      ),
    ];
  
  
    @override
    Widget build(BuildContext context) {
  
      return Stepper(
        controlsBuilder:
            (BuildContext context, {VoidCallback onStepContinue, VoidCallback onStepCancel}) {
          /*return Row(
            children: &lt;Widget&gt;[
              FlatButton(
                onPressed: onStepContinue,
                child: const Text('CONTINUE'),
              ),
              FlatButton(
                onPressed: onStepCancel,
                child: const Text('CANCEL'),
              ),
            ],
          ); */
        },
        currentStep: this._currentstep,
        type: StepperType.vertical,
        steps: steps,
        onStepTapped: (step){
            setState(() {
              _currentstep = step;
            });
          },
          onStepCancel: _movetostart,
          onStepContinue: _movetonext
        ,
      );
    }
  
  }
  
  
  </code></pre>