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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:go_navigate/go_navigate.dart';

Go home = Go.init();

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',)),),);
}
2
likes
120
pub points
0%
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