{"id":13684583,"url":"https://github.com/Salby/morpheus","last_synced_at":"2025-05-01T00:32:11.899Z","repository":{"id":56834922,"uuid":"179065082","full_name":"Salby/morpheus","owner":"Salby","description":"A Flutter package for easily implementing Material Design navigation transitions.","archived":false,"fork":false,"pushed_at":"2021-09-12T13:32:32.000Z","size":13888,"stargazers_count":192,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T06:33:44.634Z","etag":null,"topics":["flutter","flutter-animation","flutter-package","material-design","material-motion"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/morpheus","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Salby.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-02T11:39:57.000Z","updated_at":"2024-10-22T17:52:34.000Z","dependencies_parsed_at":"2022-09-02T03:40:51.292Z","dependency_job_id":null,"html_url":"https://github.com/Salby/morpheus","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salby%2Fmorpheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salby%2Fmorpheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salby%2Fmorpheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Salby%2Fmorpheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Salby","download_url":"https://codeload.github.com/Salby/morpheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251802840,"owners_count":21646287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-animation","flutter-package","material-design","material-motion"],"created_at":"2024-08-02T14:00:35.205Z","updated_at":"2025-05-01T00:32:11.208Z","avatar_url":"https://github.com/Salby.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# Morpheus\n\n![Pub](https://img.shields.io/pub/v/morpheus.svg)\n[![Actions Status](https://github.com/Salby/morpheus/workflows/Test/badge.svg)](https://github.com/Salby/morpheus/actions)\n\nA Flutter package for easily implementing Material Design navigation transitions.\n\n## Examples\n\n### Parent-child transition\n\nYou can use `MorpheusPageRoute` to create a [parent-child transition](https://material.io/design/navigation/navigation-transitions.html#hierarchical-transitions) between two screens.\n\n\u003cimg src=\"https://github.com/Salby/morpheus/blob/master/assets/parentchild-demo.gif\" align = \"right\" width=\"30%\" alt=\"Parent-child gif\"\u003e\n\n```dart\nimport 'package:morpheus/morpheus.dart';\n\nclass MyList extends StatelessWidget {\n\n  @override\n  Widget build(BuildContext context) {\n    return ListView.builder(\n      itemCount: 10,\n      itemBuilder: (context, index) {\n        final _parentKey = GlobalKey();\n        return ListTile(\n          key: _parentKey,\n          leading: CircleAvatar(child: Text((index + 1).toString())),\n          title: Text('Item ${index + 1}'),\n          onTap: () =\u003e _handleTap(context, _parentKey),\n        );\n      }\n    );\n  }\n\n  void _handleTap(BuildContext context, GlobalKey parentKey) {\n    Navigator.of(context).push(MorpheusPageRoute(\n      builder: (context) =\u003e Scaffold(),\n      parentKey: parentKey,\n    ));\n  }\n\n}\n```\n\n### Top-level transition\n\nYou can use the `MorpheusTabView` widget to create a [top-level transition](https://material.io/design/navigation/navigation-transitions.html#peer-transitions) when the child widget changes.\n\n\u003cimg src=\"https://github.com/Salby/morpheus/blob/master/assets/toplevel-demo.gif\" align = \"right\" width=\"30%\" alt=\"Top-level gif\"\u003e\n\n```dart\nimport 'package:morpheus/morpheus.dart';\n\nclass MyTabScreen extends StatefulWidget {\n\n  @override\n  _MyTabScreenState createState() =\u003e _MyTabScreenState();\n\n}\n\nclass _MyTabScreenState extends State\u003cMyTabScreen\u003e {\n\n  final List\u003cWidget\u003e _screens = [\n    Scaffold(backgroundColor: Colors.green),\n    Scaffold(backgroundColor: Colors.red),\n    Scaffold(backgroundColor: Colors.blue),\n  ];\n  int _currentIndex = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: MorpheusTabView(\n        child: _screens[_currentIndex]\n      ),\n      bottomNavigationBar: BottomNavigationBar(\n        currentIndex: _currentIndex,\n        items: [\n          BottomNavigationBarItem(\n            icon: Icon(Icons.trending_up),\n            title: Text('Trending'),\n          ),\n          BottomNavigationBarItem(\n            icon: Icon(Icons.star),\n            title: Text('Saved'),\n          ),\n        ],\n        onTap: (index) {\n          if (index != _currentIndex) {\n            setState(() =\u003e _currentIndex = index);\n          }\n        },\n      ),\n    );\n  }\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSalby%2Fmorpheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSalby%2Fmorpheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSalby%2Fmorpheus/lists"}