Git Product home page Git Product logo

morpheus's People

Contributors

salby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

morpheus's Issues

Kinda not working on Android 8.0

Hey, tnx for amazing plugin. Just one issue, I've tested on Android 9.0 and 8.0, on 9.0 everything is working as expected while on 8.0 there is no transition at all, or maybe the speed of transition is too fast(thats my opinion). I'm talking about parent-child transition. Tabview transition on 8.0 is working but its to fast.. What could be the cause? Tnx in advance

Example for a nested page with back button and slide animation ?

Hello,

I have been following the examples, but i would like to know if it's possible to have lower pages under the navigator in MorpheusTabView.

If each of the pages in the tab view have a separate stack and persist the state, it's possible to have a page pushed only in that tab? Let's say that one of the MorpheusTabView tabs is settings. And I would like to push a names route /settings/locale only to the settings tab.

This pushed route would have a back button in the top bar?
After going to Profile and returning to settings, the navigated page would be there?
It could be possible to add a custom animation to that named route? for example a slide-right?

All this while keeping the bottom navigation bar, and also accepting params from the router.

thanks

Breaking change with flutter 3.13.0

Error (Xcode): ../../../.pub-cache/hosted/pub.dev/morpheus-1.2.3/lib/page_routes/morpheus_page_transition.dart:191:48: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.
Getting this if I use flutter 3.13.0, not with Flutter 3.10.6.

not able to go back on swipe

I'm using it with auto_route to generate routes

here is the function I created to use with auto_route package:

Widget morpheusTransition(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) { final transitionSettings = MorpheusRouteArguments( // parentKey: parentKey, scrimColor: Colors.black45, borderRadius: BorderRadius.circular(20), transitionColor: context.theme.bottomAppBarColor, transitionToChild: true, scaleChild: true, ); return MorpheusPageTransition(context: context, animation: animation, secondaryAnimation: secondaryAnimation, child: child, settings: transitionSettings); }

And this is how I'm using it:
@CustomAutoRouter(transitionsBuilder: morpheusTransition) class $Router { @initial StartUpView startUpViewRoute; LoginView loginViewRoute; ..... }

Can't use the parent child transition, receiving assertion error in console.

Hi there,

Whenever I try to use your package with the parent-child transition on a ListTile that opens up another page, the transition seems to start but whenever it finishes I'm getting a red screen and the following console log:

════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown building AnimatedBuilder(animation: Listenable.merge([AnimationController#d144d(⏭ 1.000; paused; for MorpheusPageRoute<dynamic>)➩ProxyAnimation, kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation]), dirty, dependencies: [MediaQuery], state: _AnimatedState#243c9):
'package:flutter/src/rendering/object.dart': Failed assertion: line 2259 pos 12: 'attached': is not true.


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

User-created ancestor of the error-causing widget was
    MaterialApp 
lib/main.dart:12
When the exception was thrown, this was the stack
#2      RenderObject.getTransformTo 
package:flutter/…/rendering/object.dart:2259
#3      RenderBox.localToGlobal 
package:flutter/…/rendering/box.dart:2257
#4      MorpheusPageRoute._findRenderBox 
package:morpheus/page_routes/morpheus_page_route.dart:86
#5      MorpheusPageRoute.buildTransitions 
package:morpheus/page_routes/morpheus_page_route.dart:150
#6      _ModalScopeState.build.<anonymous closure> 
package:flutter/…/widgets/routes.dart:652

Any idea what could be wrong here?

I am using the following code:

class LocationActivityInformationPage extends StatelessWidget {
  final List<Location> locations;
  final String scroll;
  
  LocationActivityInformationPage(this.locations, this.scroll);
  
  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
        padding:EdgeInsets.all(8.0),
        child: Column(
          children: <Widget>[
                Card(
                elevation: 3.0,
                child: ListView.builder(
                  physics: NeverScrollableScrollPhysics(),
                  key: PageStorageKey(this.scroll),
                  scrollDirection: Axis.vertical,
                  shrinkWrap: true,
                  itemCount: this.locations.length,
                  itemBuilder: (context, index) {
                    final _parentKey = GlobalKey();
                    return _renderlocation(context, this.locations, index, _parentKey);
                  }
                )
              )
          ]
        )
    );
  }
Widget _renderlocation(BuildContext context, List<Location> locations, int index, GlobalKey key) {
    var result;
    result = ListTile(
      key: key,
      leading: _locationIcon(locations[index].image),
      title: _locationName(locations[index].name),
      subtitle: _locationCity(locations[index].city.name),
      onTap: ()=> _handleTap(context, key)
    );
    return result;
  }
void _handleTap(BuildContext context, GlobalKey parentkey) {
    Navigator.of(context).push(MorpheusPageRoute(
      builder: (context) => LocationDetailsPage(),
      parentKey: parentkey,
    ));
  }

I've been told this problem has to do with the following property:
https://api.flutter.dev/flutter/foundation/AbstractNode/attached.html

Could you please take a look at it?

EDIT:
Apparently this issue happens when you animate to a screen from a screen that has been pushed through navigation. So for example I have a screen that pushes a screen on top of it, and then I click on the ListTile inside that screen to navigate to the child screen of the ListTile.

I'm trying to find a solution for it but can't figure out what I should be doing so far.

Maintaining state

Is there a way to maintain state on MorpheusPageRoute, because I need this functionality for IOS, user can't navigate back with a back swipe..

Child always rebuilding on switch

Hi.
Is there any way to persist the child's state? Every time I make the child switch, it is rebuilt again.

I'm working with Statefull widgets and switching in a bottomNavigationBar. I even tried with the AutomaticKeepAliveClientMixin.

Thanks (btw, I really like transitions, great work).

Support for GridViews/SliverGrids with the MorpheusPageRoute

Currently the MorpheusPageRoute only supports ListViews, with only 1 item for each Row.

It should also support GridViews, with multiple items per Row, having the animation first expand the item horizontally and then vertically.

Thanks for the great work btw^^

Support for new Dart language version by fixing nullability issues

Currently this library cannot be used on newer versions of Dart due to null safety improvements:

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

- package:morpheus
2

For solutions, see https://dart.dev/go/unsound-null-safety

Expand from circular widget like FAB

Hi how to use MorpheusPageRoute to create a radial expansion from a floating action button to the new screen?
This feature is implemented in the package animations, but I prefer using your plugin.
Thanks

Pass arguments to screen

I got problem of send arguments with Morpheus. I got this error. How can I solve?

immagine

Code where I set up the Route is:

immagine

And here where I pass data to new screen:

immagine

And to get information of arguments I use this line:
immagine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.