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

outdated

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(MyApp());

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(),
        });
  }
}

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'),
      )),
    );
  }
}

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
0
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

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

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on custom_route_transition_j