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

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

Usage Scenarios #

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

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on go_navigate