route_transitions_womo 0.0.4 copy "route_transitions_womo: ^0.0.4" to clipboard
route_transitions_womo: ^0.0.4 copied to clipboard

This package make transitions beetween pages easier for development.

example/main.dart

import 'package:flutter/material.dart';
import 'package:route_transitions_womo/route_transitions_womo.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': (_) => Page1(), 'page2': (_) => Page2()},
    );
  }
}

class Page1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text('Page 1'),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.blue,
      body: Center(
        child: MaterialButton(
          child: Text('Go to Page 2'),
          color: Colors.white,
          onPressed: () {
            RouteTransitions(
                context: context,
                child: Page2(),
                animation: AnimationType.fadeIn,
                replacement: true,
                duration: Duration(milliseconds: 800));
          },
        ),
      ),
    );
  }
}

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

Publisher

unverified uploader

This package make transitions beetween pages easier for development.

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on route_transitions_womo