Search packages, repositories and app categories

Package detailsv1.2.3

morpheus

A Flutter package for easily implementing Material Design navigation transitions.

30-day downloads
107
Likes
37
Pub points
70

Install package

flutter pub add morpheus

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Morpheus is a Flutter package designed to simplify the implementation of Material Design navigation transitions. It provides intuitive APIs for creating smooth, consistent, and visually appealing route transitions that align with Material Design guidelines. By abstracting complex animation logic, it enables developers to enhance user experience with minimal code. The package supports seamless integration into existing Flutter apps and focuses on delivering polished navigation behaviors out of the box.

Use cases

  • Implementing Material Design-style page transitions
  • Enhancing app navigation with smooth animations
  • Adding consistent transition behavior across screens
  • Improving user experience in mobile apps
  • Customizing route transitions with minimal effort

Key features

  • Built-in Material Design transition patterns
  • Simple API for common navigation animations
  • Consistent and predictable transition behavior
  • Lightweight and easy to integrate
  • Supports both push and pop transitions

Suitable for

  • Flutter developers building Material Design apps
  • Teams prioritizing UX with smooth navigation
  • Apps requiring standardized route transitions
  • Developers seeking quick transition implementation
  • Projects focused on visual polish and consistency

Considerations

  • Limited customization beyond standard Material transitions
  • No support for non-Material design systems
  • May require additional styling for non-standard use cases
  • Not optimized for highly complex or custom animation workflows

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Morpheus

Pub Actions Status

A Flutter package for easily implementing Material Design navigation transitions.

Examples

Parent-child transition

You can use MorpheusPageRoute to create a parent-child transition between two screens.

Parent-child gif
import 'package:morpheus/morpheus.dart';

class MyList extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemCount: 10,
      itemBuilder: (context, index) {
        final _parentKey = GlobalKey();
        return ListTile(
          key: _parentKey,
          leading: CircleAvatar(child: Text((index + 1).toString())),
          title: Text('Item ${index + 1}'),
          onTap: () => _handleTap(context, _parentKey),
        );
      }
    );
  }

  void _handleTap(BuildContext context, GlobalKey parentKey) {
    Navigator.of(context).push(MorpheusPageRoute(
      builder: (context) => Scaffold(),
      parentKey: parentKey,
    ));
  }

}
Top-level transition

You can use the MorpheusTabView widget to create a top-level transition when the child widget changes.

Top-level gif
import 'package:morpheus/morpheus.dart';

class MyTabScreen extends StatefulWidget {

  @override
  _MyTabScreenState createState() => _MyTabScreenState();

}

class _MyTabScreenState extends State<MyTabScreen> {

  final List<Widget> _screens = [
    Scaffold(backgroundColor: Colors.green),
    Scaffold(backgroundColor: Colors.red),
    Scaffold(backgroundColor: Colors.blue),
  ];
  int _currentIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: MorpheusTabView(
        child: _screens[_currentIndex]
      ),
      bottomNavigationBar: BottomNavigationBar(
        currentIndex: _currentIndex,
        items: [
          BottomNavigationBarItem(
            icon: Icon(Icons.trending_up),
            title: Text('Trending'),
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.star),
            title: Text('Saved'),
          ),
        ],
        onTap: (index) {
          if (index != _currentIndex) {
            setState(() => _currentIndex = index);
          }
        },
      ),
    );
  }

}

Categories

Source repository

Projects using this package