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

Paquete next_transitions: paquete que ayuda al manejo de transiciones entre pantallas de forma elegante y facil

example/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @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("Page 1", style: TextStyle(color: Colors.white)),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.blue,
      body: Center(
         child: MaterialButton(
          color: Colors.white,
          onPressed: () {
            NextTransitions(
              context: context,
              child: Page2(),
              animation: AnimationType.fadeIn,
              duration: Duration(milliseconds: 100),
              replacement: true
            );
          },
          child: Text("Go to page2"),
         )
      ),
    );
  }
}

class Page2 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Page 2", style: TextStyle(color: Colors.white)),
        backgroundColor: Colors.transparent,
      ),
      backgroundColor: Colors.blueGrey,
      body: Center(
         child: Text('Page2'),
      ),
    );
  }
}
1
likes
160
points
21
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Paquete next_transitions: paquete que ayuda al manejo de transiciones entre pantallas de forma elegante y facil

Homepage

License

MIT (license)

Dependencies

flutter

More

Packages that depend on next_transitions