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

A dart package for Flutter that allows co-ordinated page transitions that animate the previous route as well as the incoming route.

example/lib/main.dart

import 'package:coordinated_page_route/coordinated_page_route.dart';
import 'package:example/src/on_generate_route.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 const MaterialApp(home: MaterialAppExample());
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.black,
      child: MaterialApp(
        navigatorObservers: [
          CoordinatedRouteObserver() // <--- This must go here!
        ],
        initialRoute: 'home',
        onGenerateRoute: onGenerateRoute,
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Navigator(
      observers: [
        CoordinatedRouteObserver() // <--- This must go here!
      ],
      initialRoute: 'home',
      onGenerateRoute: onGenerateRoute,
    ));
  }
}
3
likes
160
pub points
23%
popularity

Publisher

unverified uploader

A dart package for Flutter that allows co-ordinated page transitions that animate the previous route as well as the incoming route.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on coordinated_page_route