Showing Error While Routing From One Screen To Another In Flutter
I'm moving from one screen to another screen but it shows error in routing. My First screen named as VenueOption and the second one is PlayerOption This is Venue Option Class class
Solution 1:
Try this
class VenueOption extends StatelessWidget {
final String userType;
BuildContext ctx;
const VenueOption({Key key, @required this.userType}) : super(key: key);
@override
Widget build(BuildContext context) {
ctx = context;
return Scaffold(
body: ProfileBoard(
userType: userType,
),
);
}
void pushToDashboard() {
Navigator.of(ctx).push(MaterialPageRoute(
builder: (BuildContext context) => PlayerOption()));
}
}
Baca Juga
- Unable To Find Bundled Java Version With Flutter Doctor, After Updating Android Studio Arctic Fox(2020.3.1) On M1 Apple Silicon
- I Am Getting This Errors “cmdline Tools Component Is Missing” I Have Installed Flutter And Android Studio, How To Solve Them, Or What Has To Be Done?
- No Materiallocalizations Found - Myapp Widgets Require Materiallocalizations To Be Provided By A Localizations Widget Ancestor
Post a Comment for "Showing Error While Routing From One Screen To Another In Flutter"