0
     List<Step> steps = [    
      Step(
      isActive: false,
      state: StepState.editing,
      title: const Text('Id Proof'),
      content: Column(
        children: <Widget>[
         OutlineButton(
         onPressed: chooseImage,
         child: Text('Choose Image'),),
         showImage(),            
         OutlineButton(
         onPressed: startUpload,
         child:Text(Upload Image),
         ),
      Text(status,textAlign:TextAlign.center,style:TextStyle(color:Colors.green))
        ],
      ),
    ),  
  ];

Unable to initialize chooseImage, showImage, startUpload. I have tried to initiate above the steps starting. showing errors

Only static members can be accessed in initializers

koushiki
  • 9
  • 4

1 Answers1

0

chooseImage & startUpload are not functions, if you created a function

void chooseImage() {
 // add image picking code here
}

then you need to change

onPressed: chooseImage,

to

onPressed: chooseImage(),

if you didn't make those functions you could also do

onPressed: () {
// add image picking code here
}
cas
  • 757
  • 4
  • 19