Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling breaks when turning android phone #42

Open
mennovanhout opened this issue Feb 19, 2024 · 7 comments
Open

Scrolling breaks when turning android phone #42

mennovanhout opened this issue Feb 19, 2024 · 7 comments

Comments

@mennovanhout
Copy link
Contributor

If you have a dashboard and keep it in portrait mode. When the dashboard doesn't fit rotating to landscape it just gives up rotating at all. And will never work again until restart.

@mennovanhout
Copy link
Contributor Author

mennovanhout commented Feb 19, 2024

The following _TypeError was thrown building _DashboardStack<CustomDashboardItem>-[LabeledGlobalKey<_DashboardStackState<CustomDashboardItem>>#ceda8](dirty, state: _DashboardStackState<CustomDashboardItem>#dc000):
Null check operator used on a null value

The relevant error-causing widget was: 
  Dashboard<CustomDashboardItem> Dashboard:file:///C:/development/apps/hdashboards/lib/screens/dashboard.dart:298:19
When the exception was thrown, this was the stack: 
#0      _ItemCurrentLayout.isBottomSide (package:dashboard/src/models/item_current_layout.dart:900:55)
#1      _ItemCurrentLayout._currentPosition (package:dashboard/src/models/item_current_layout.dart:230:21)
#2      _DashboardStackState.buildPositioned (package:dashboard/src/widgets/dashboard_stack.dart:96:59)
#3      _DashboardStackState.build.<anonymous closure> (package:dashboard/src/widgets/dashboard_stack.dart:287:18)
#4      MappedIterator.moveNext (dart:_internal/iterable.dart:403:20)
#5      new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202:26)
#6      new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
#7      new List.of (dart:core-patch/array_patch.dart:39:18)

Looks its coming from isBottomSide in item_current_layout.dart

bool get isBottomSide {
    var last = (_layoutController._endsTree.lastKey())!; // THIS LINE
    var lIn = _layoutController.getIndexCoordinate(last);
    return _layoutController.getIndexCoordinate(_endIndex)[1] == lIn[1];
  }

@mennovanhout
Copy link
Contributor Author

New reproducable way:

  1. Open example project
  2. Use trash icon to delete all current cards
  3. Add new card via + icon
  4. Drag the card to the bottom of the screen, it crashes!

@mennovanhout
Copy link
Contributor Author

@Mehmetyaz i am also willing to pay to get the issues resolved please contact me.

@Mehmetyaz
Copy link
Owner

Hey! I am sorry. No need for money my friend. But I'm very busy right now. It's not possible for me to take care of it for a few more days. But if you can throw a PR it can be resolved sooner. Or you'll have to wait a little longer.

@mennovanhout
Copy link
Contributor Author

Hey! I am sorry. No need for money my friend. But I'm very busy right now. It's not possible for me to take care of it for a few more days. But if you can throw a PR it can be resolved sooner. Or you'll have to wait a little longer.

I am trying to resolve it myself haha, but my in depth knowledge of flutter is not nearly enough.
I found that some variables are failing within the flutter core _maxExtend being null for instance. Probably due the fact that in dashboard _scroll runs either to fast or something. But i couldn't find any solution so far, i already saw _scroll is being called on addPostFrame....

But litterly my entire company is a bit running on dashboard so please let me atleast do a donation! As your package is the core of my business, i would love to do a contribution.

@Mehmetyaz
Copy link
Owner

Open source is open source :) I don't think it's something that deserves sponsorship.

BUT!

I am actively looking for a job, I can work/consult at your company part time or full time and remotely. It's not just for Flutter positions either.

In any case:

I will try to solve the problem after a few days.

@mennovanhout
Copy link
Contributor Author

Open source is open source :) I don't think it's something that deserves sponsorship.

BUT!

I am actively looking for a job, I can work/consult at your company part time or full time and remotely. It's not just for Flutter positions either.

In any case:

I will try to solve the problem after a few days.

Reach out to me via info@hdashboards.app there some things i am struggling with within flutter and things i could do better or more efficient. I would like to hire you as a freelance for s bit to help me out? Im a solo company so that would be amazing. Mail me your hourly rate etc please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants