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

discontinued

This package helps transitions between screens elegantly and easily.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Material App',
      initialRoute: 'page1',
      routes: {
        'page1': (_) => Page1Page(),
        'page2': (_) => Page2Page(),
      },
    );
  }
}

class Page1Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Page 1"),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.blue,
      body: Container(
        child: Center(
          child: MaterialButton(
            color: Colors.white,
            onPressed: () {
              RouteTransitions(
                context: context,
                child: Page2Page(),
                animationType: AnimationType.fadeIn,
                duration: Duration(seconds: 2),
              );
            },
            child: Text("Go to Page 2"),
          ),
        ),
      ),
    );
  }
}

class Page2Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Page 1"),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.blueGrey,
      body: Container(
        child: Center(child: Text("Page2 Page")),
      ),
    );
  }
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

This package helps transitions between screens elegantly and easily.

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on route_transition_pz