blockbuilder_transition 0.0.3
blockbuilder_transition: ^0.0.3

Flutter Android iOS web

A Flutter package that prevents the build function to execute on the page that start the navigation routes.

BlockBuildPageRoute #

A Flutter package that prevents the build function to execute on the page that start the navigation routes.

Usage #

To use this plugin, add blockbuilder_transition as a [dependency in your pubspec.yaml file].

Example #

// Import package
import 'package:blockbuilder_transition';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Home Page'),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('Open route'),
          onPressed: () {
             Navigator.of(context).push(BlockBuildPageRoute(
                    transition:PageTransition.FadeTrans //not specifying transition uses CupertinoPageTransition
                    widget:  SecondRoute(
                 )),//Navigate to second route when tapped.
          },
        ),
      ),
    );
  }
}

class SecondRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Second Route"),
      ),
      body: Center(
        child: RaisedButton(
          onPressed: () {

          },
          child: Text('Go back!'),
        ),
      ),
    );
  }
}
1
likes
70
pub points
8%
popularity

A Flutter package that prevents the build function to execute on the page that start the navigation routes.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jitenbasnet7@gmail.com

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on blockbuilder_transition