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

Este paquete ayuda al manejo de transicones entre pantallas de forma elegante y fácil.

example/main.dart

import 'package:flutter/material.dart';

import 'package:route_transitions_jam/route_transitions_jam.dart';

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

class TansitionRouteApp extends StatelessWidget {
  const TansitionRouteApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'TansitionRoute App',
      initialRoute: 'screen1',
      routes: {
        'screen1': (_) => const Screen1(),
        'screen2': (_) => const Screen2(),
      },
    );
  }
}

class Screen1 extends StatelessWidget {
  const Screen1({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Screen 1'),
        centerTitle: true,
        backgroundColor: Colors.transparent,
        elevation: 1,
      ),
      backgroundColor: Colors.blue,
      body: Center(
        child: MaterialButton(
          child: const Text('Go to Screen 2'),
          color: Colors.white,
          onPressed: () {
            RouteTransitions(
              context: context,
              child: const Screen2(),
              animation: AnimationType.fadeIn,
              replacement: true,
            );
          },
        ),
      ),
    );
  }
}

class Screen2 extends StatelessWidget {
  const Screen2({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Screen 2'),
        centerTitle: true,
        backgroundColor: Colors.transparent,
        elevation: 1,
      ),
      backgroundColor: Colors.blueGrey,
      body: const Center(
        child: Text('Screen 2'),
      ),
    );
  }
}
0
likes
160
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

Este paquete ayuda al manejo de transicones entre pantallas de forma elegante y fácil.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on route_transitions_jam