flutter screen route problem

11 views
Skip to first unread message

Mohd Arshad

unread,
Oct 13, 2019, 2:24:48 PM10/13/19
to Flutter Development (flutter-dev)
iam developing an application for college project iam getting an error 

"{
"resource": "/C:/Users/Mohd Arshad/Desktop/elab/lib/login.dart",
"owner": "dart",
"code": "undefined_method",
"severity": 8,
"message": "The method 'milk' isn't defined for the class '_loginState'.\nTry correcting the name to the name of an existing method, or defining a method named 'milk'.",
"source": "dart",
"startLineNumber": 17,
"startColumn": 25,
"endLineNumber": 17,
"endColumn": 29,
"tags": []
}


iam not able to solve my problem
where milk is the next screen and iam routing the screen after google sign in 

Capture.PNG

Capture1.PNG




please help 


kindly help

best regards 



login.dart

Marc Endtricht

unread,
Oct 13, 2019, 4:51:46 PM10/13/19
to Flutter Development (flutter-dev)
It's telling you what the problem is. There is no widget called "milk" to route to.

Would be helpful to see "milk.dart". I guess it's where you want to define the next screen.
You need a class called "milk" (personally preferring capital letters for class names) in there which extends either StatelessWidget or StatefulWidget.

Reply all
Reply to author
Forward
0 new messages