go_navigate

Last updated:

0 purchases

go_navigate Image
go_navigate Images
Add to Cart

Description:

go navigate

go Navigate #
Navigate Like a pro from one Screen to another Using go navigate.
go_Navigate provide you the ability to navigate with ease from one screen to another

Navigating to/from another screen;
Passing of argument from on screen to another;

Usage #
Go home = Go.init();

/// home.goToAndDrop(context);
/// home.goTo(context, "/");
/// home.goBack(context);
/// home.goToAndClearPrev(context, route);
/// home.goToAndClearAll(context, route, defaultHome);


void main(){
runApp( MaterialApp(
theme: ThemeData(),
initialRoute: '/',
routes: {
'/':(_) =>Home(),
'/second':(_) =>Screen1()
}
));
}



class Home extends StatelessWidget {


@override
Widget build(BuildContext context) => Scaffold(

appBar: AppBar(
elevation: 0,
centerTitle: true,

title:const Text('Home',style:
TextStyle(fontSize: 14,fontWeight:FontWeight.w500),)),

body: Center(child: ElevatedButton(onPressed:(){
home.goTo(context, '/second');
}
, child:const Text('Home',)),),
);


}


class Screen1 extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(

appBar: AppBar(
elevation: 0,
centerTitle: true,

title:const Text('Screen1',style:
TextStyle(fontSize: 14,fontWeight:FontWeight.w500),)),

body: Center(child: ElevatedButton(onPressed:(){
home.goBack(context);
}
, child:const Text('Screen',)),),);
}
copied to clipboard
Usage Scenarios #

Navigate from any screen;
passing argument form any and to ant screen;

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.