custom_route_transition_fp 0.0.4 copy "custom_route_transition_fp: ^0.0.4" to clipboard
custom_route_transition_fp: ^0.0.4 copied to clipboard

An awesome, elegant and easy page transition between routes in your flutter proyect.

example/main.dart

import 'package:flutter/material.dart';
import 'package:custom_route_transition_fp/custom_route_transition_fp.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: 'screen1',
      routes: {
        'screen1': (_) => const Screen1(),
        'screen2': (_) => const Screen2(),

      },
    );
  }
}

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


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.blue,
      appBar: AppBar(
        title: const Text('Screen 1'),
        backgroundColor: Colors.transparent,
        elevation: 0,
        centerTitle: true,
      ),
      body: Center(
        child: MaterialButton(
          color: Colors.white,
          onPressed: () {

            AwesomeRouteTransitions(
              context: context, 
              child: const Screen2(),
              animation: AnimationType.fadeIn,
              duration: const Duration(milliseconds: 300),
              replacement: false
            );

          },
          child: const Text('Go to Screen 2'),
        )
     ),
   );
  }
}

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


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

Publisher

unverified uploader

An awesome, elegant and easy page transition between routes in your flutter proyect.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_route_transition_fp