custom_route_transition_rm 0.0.3 icon indicating copy to clipboard operation
custom_route_transition_rm: ^0.0.3 copied to clipboard

Este paquete ayuda al manejo de las transiciones entre pantallas de forma fácil.

example/main.dart

import 'package:flutter/material.dart';
import 'package:custom_route_transition_rm/custom_route_transition_rm.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.blueAccent,
      body: Center(
        child: MaterialButton(
          child: Text('Go to page 2'),
          color: Colors.white,
          onPressed: (){
            RouteTransitions(
              context: context,
              child: Page2Page(),
              animation: AnimationType.fadeIn,
            );
          }
        )
     ),
   );
  }
}

class Page2Page extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Page 2'),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.lightBlueAccent,
      body: Center(
        child: Text('Page 2'),
     ),
   );
  }
}
0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Este paquete ayuda al manejo de las transiciones entre pantallas de forma fácil.

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_route_transition_rm