Code Monkey home page Code Monkey logo

page_view_dot_indicator's Issues

Don't use MediaQuery

Hi, this widget has a screen-wide width.
image

It's incorrect, I cannot wrap the PageViewDotIndicator into Container because of it
image

Wanted result:
image

Actual result:
image

You probably should use shrink-wrap / IntrinsicWidth, to set an actual content size, instead of a MediaQuery size.

Null check operator used on a null value (_maxScrollExtent is null)

Hi, I'm facing a weird issue. I create a PageViewDotIndocator with currentPage = 0 and length = 12. I get the following stacktrace (see below).
The corresponding code in the PageViewDotIndocator code is:

double get maxScrollExtent => _maxScrollExtent!;

I did a quick investigation but didn't find any clue. Any idea? My enclosing layout probably causes it, but this Null check error should probably not happen...

Null check operator used on a null value

When the exception was thrown, this was the stack: 
#0      ScrollPosition.maxScrollExtent (package:flutter/src/widgets/scroll_position.dart:145:49)
#1      _PageViewDotIndicatorState._getOffsetForCurrentPosition (package:page_view_dot_indicator/src/indicator.dart:172:36)
#2      _PageViewDotIndicatorState.scrollToCurrentPosition (package:page_view_dot_indicator/src/indicator.dart:109:26)
#3      _PageViewDotIndicatorState.didUpdateWidget (package:page_view_dot_indicator/src/indicator.dart:103:7)
#4      StatefulElement.update (package:flutter/src/widgets/framework.dart:5142:55)
#5      Element.updateChild (package:flutter/src/widgets/framework.dart:3660:15)
#6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4993:16)

Seeing flutter error thrown

Hi, we have been using the library for a while now and has been great. We have been seeing some crashes come back in our crash reporting however. Guessing it is unmounted or hasn't added the scroll controller into the scrollView yet.

Non-fatal Exception: FlutterError
0 ??? 0x0 growable_array.Bad_state_No_element:_ + 353 (growable_array.dart:353)
1 ??? 0x0 _GrowableList.single (dart:core)
2 ??? 0x0 ScrollController.position + 109 (scroll_controller.dart:109)
3 ??? 0x0 _PageViewDotIndicatorState._getOffsetForCurrentPosition + 164 (indicator.dart:164)
4 ??? 0x0 _PageViewDotIndicatorState.scrollToCurrentPosition + 101 (indicator.dart:101)
5 ??? 0x0 _PageViewDotIndicatorState.initState. + 89 (indicator.dart:89)
6 ??? 0x0 SchedulerBinding._invokeFrameCallback + 1146 (binding.dart:1146)
7 ??? 0x0 SchedulerBinding.handleDrawFrame + 1091 (binding.dart:1091)
8 ??? 0x0 SchedulerBinding._handleDrawFrame + 997 (binding.dart:997)

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.