smooth_page_indicator icon indicating copy to clipboard operation
smooth_page_indicator copied to clipboard

Unsupported operation: Infinity or NaN toInt

Open VadymPinchuk opened this issue 1 year ago • 7 comments

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)

VadymPinchuk avatar Jul 15 '24 10:07 VadymPinchuk

Facing Same Issue . Please help to resolve it

jay-mahakalagro avatar Jul 18 '24 07:07 jay-mahakalagro

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

Milad-Akarie avatar Jul 20 '24 08:07 Milad-Akarie

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 avatar Aug 09 '24 07:08 mrjanees

Any solution?

mrjanees avatar Aug 12 '24 07:08 mrjanees

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

VadymPinchuk avatar Sep 04 '24 09:09 VadymPinchuk

Firebase crashlytics keep spamming this error yet....

ProjectHousePC avatar Sep 17 '24 07:09 ProjectHousePC

send a fix in pull request #87

passos avatar Oct 08 '24 21:10 passos

@Milad-Akarie could you check this PR.

VadymPinchuk avatar Nov 21 '24 15:11 VadymPinchuk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Jan 20 '25 15:01 github-actions[bot]