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

Este paquete ayuda al manejo de transición entre pantallas de forma elegante y fácil, brindando flexibilidad al desarrollador para modificar dicha transición.

example/main.dart

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

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

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

class Page1Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.blue,
      appBar: AppBar(
        title: Text("Page1"),
        backgroundColor: Colors.transparent,
      ),
      body: Center(
        child: MaterialButton(
          child: Text("Go page 2"),
          color: Colors.white,
          onPressed: () {
            AnimateRouteTransition(
                context: context,
                animation: AnimationType.fadeIn,
                duration: Duration(milliseconds: 500),
                replacement: false,
                animateCurve: Curves.easeInOut,
                child: Page2Page());
          },
        ),
      ),
    );
  }
}

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

Publisher

unverified uploader

Este paquete ayuda al manejo de transición entre pantallas de forma elegante y fácil, brindando flexibilidad al desarrollador para modificar dicha transición.

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on animate_route_transition