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

Este paquete contiene transiciones con animaciones para una mejor experiencia de usuario y desarrollador

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      initialRoute: "page1",
      routes: {"page1": (_) => Page1(), "page2": (_) => Page2()},
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Page 1")),
      backgroundColor: Colors.greenAccent,
      body: Center(
        child: MaterialButton(
          onPressed: () {
            DanthorRouteTransitions(context: context, child: Page2());
          },
          color: Colors.white,
          child: Text("go to page 2"),
        ),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Page 2")),
      backgroundColor: Colors.blueAccent,
      body: Center(child: Text("page 2")),
    );
  }
}
0
likes
155
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Este paquete contiene transiciones con animaciones para una mejor experiencia de usuario y desarrollador

Homepage

License

MIT (license)

Dependencies

flutter

More

Packages that depend on danthor_route_transitions