go_navigate 1.0.0+1 copy "go_navigate: ^1.0.0+1" to clipboard
go_navigate: ^1.0.0+1 copied to clipboard

outdated

Go navigate helps you naviagte to differnt screen ....naviagte.goBack

Go Navigate

Pub.dev Badge GitHub Build Badge Effective Dart Badge MIT License Badge Flutter Platform Badge

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.goToAndDrop(context,defaultHome: '/oo');
    }
        , child:const Text('Screen',)),),);
}

Usage Scenarios #

  • Navigate from any screen;
  • passing argument form any and to ant screen;
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Go navigate helps you naviagte to differnt screen ....naviagte.goBack

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on go_navigate