Kishore
Kishore

Reputation: 23

SizedBox() error "Too many positional arguments: 2 expected, but 4 found. Try removing the extra arguments." flutter

enter image description here[this is the SizedBox() issue I am seeing please help, the error says "Too many positional arguments: 2 expected, but 4 found. Try removing the extra arguments.'"][2]

Upvotes: 0

Views: 363

Answers (2)

Brightcode
Brightcode

Reputation: 768

Your Navigator.push() is missing a parenthesis so add it at the end

Navigator.push(
   context,
   MaterialPageRoute(
    builder: (context){
     return Home();
    }
   ),
), // this is missing

Upvotes: 0

Mehdi
Mehdi

Reputation: 170

Close the parenthesis of navigator.push and press function

enter image description here

Upvotes: 1

Related Questions