blockbuilder_transition 0.0.3 copy "blockbuilder_transition: ^0.0.3" to clipboard
blockbuilder_transition: ^0.0.3 copied to clipboard

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
20
pub points
0%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on blockbuilder_transition