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

Este paquete ayuda con con las transciones entre diferentes pantallas de froma facil.

example/main.dart

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

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

/// inicio de la aplicaicion
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

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

/// pagina1 para el ejemplo
class Page1Page extends StatelessWidget {
  const Page1Page({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          title: const Text('Page 1'),
          centerTitle: true,
          backgroundColor: Colors.transparent),
      backgroundColor: Colors.blue,
      body: Center(
          child: MaterialButton(
        onPressed: () {
          RouteTransition(
            context: context,
            child: const Page2Page(),
            animation: AnimationType.fadeIn,
          );
        },
        child: const Text('Go to page2'),
      )),
    );
  }
}

/// Pagina2 donde envia la animacion
class Page2Page extends StatelessWidget {
  const Page2Page({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          centerTitle: true,
          title: const Text('Page 2'),
          backgroundColor: Colors.transparent),
      backgroundColor: Colors.blueGrey,
      body: const Center(
        child: Text('Page2Page'),
      ),
    );
  }
}
4
likes
160
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

Este paquete ayuda con con las transciones entre diferentes pantallas de froma facil.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_route_transition_j