transition_customer 0.0.5 copy "transition_customer: ^0.0.5" to clipboard
transition_customer: ^0.0.5 copied to clipboard

Este paquete facilita la implementacón de transiciones entre pantallas de forma fácil.

example/main.dart

import 'package:flutter/material.dart';
import 'package:transition_customer/transition_customer.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(
        title: Text('Pagina 1'),
        backgroundColor: Colors.transparent
      ),
      body: Center(
        child: MaterialButton(
          child: Text('Ir a Page 2'),
          color: Colors.blue,
          onPressed: () {


            TransitionCustomer(
              context: context,
              child: Page2(),
              animation: AnimationType.fadeIn,
              duration: Duration(milliseconds: 200 ),
              replacement: true
              );



          },)
     ),
   );
  }
}



class Page2 extends StatelessWidget {

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

Publisher

verified publishergoogle.pablinux.com

Este paquete facilita la implementacón de transiciones entre pantallas de forma fácil.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on transition_customer