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

Unsupported operation: Infinity or NaN toInt #84

Open
VadymPinchuk opened this issue Jul 15, 2024 · 7 comments
Open

Unsupported operation: Infinity or NaN toInt #84

VadymPinchuk opened this issue Jul 15, 2024 · 7 comments

Comments

@VadymPinchuk
Copy link

The following UnsupportedError was thrown during paint():
Unsupported operation: Infinity or NaN toInt

When the exception was thrown, this was the stack: 
#0      double.floor (dart:core-patch/double.dart)
#1      ScrollingDotsPainter.paint (package:smooth_page_indicator/src/painters/scrolling_dots_painter.dart:31:34)
#2      RenderCustomPaint._paintWithPainter (package:flutter/src/rendering/custom_paint.dart:588:13)
#3      RenderCustomPaint.paint (package:flutter/src/rendering/custom_paint.dart:630:7)
#4      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
#5      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:250:13)
#6      RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:130:13)
#7      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:3239:7)
@jay-mahakalagro
Copy link

Facing Same Issue . Please help to resolve it

@Milad-Akarie
Copy link
Owner

@VadymPinchuk @jay-mahakalagro are you using AnimatedSmoothIndicator or SmoothPageIndicator?

@mrjanees
Copy link

mrjanees commented Aug 9, 2024

Facing the Same Issue. I am using AnimatedSmoothIndicator. My Flutter version is 3.22.3 . Dart 3.4.4 and smooth_page_indicator: ^1.2.0. How to solve this issue?

@mrjanees
Copy link

Any solution?

@VadymPinchuk
Copy link
Author

VadymPinchuk commented Sep 4, 2024

SmoothPageIndicator(
          controller: pageController,
          count: pageCount,
          effect: ScrollingDotsEffect(
            maxVisibleDots: 7,
            activeDotScale: 1.0,
            dotHeight: dimens.indicatorDotSize,
            dotWidth: dimens.indicatorDotSize,
            spacing: dimens.indicatorDotSize * 2,
            dotColor: theme.colors.baseLight30,
            activeDotColor: theme.colors.baseLightPrimary,
          ),
        )

this is my code.
In regards of Flutter - I am on the main branch :) need it for work. But on 3.24 it was the same
@Milad-Akarie can you check it out?
Thanks

@ProjectHousePC
Copy link

Firebase crashlytics keep spamming this error yet....

@passos
Copy link

passos commented Oct 8, 2024

send a fix in pull request #87

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

6 participants