mingsnx / animated_digit

A scrolling digit animation widget
MIT License
37 stars 17 forks source link

Digits not aligned #6

Closed leecasey closed 1 year ago

leecasey commented 2 years ago
Screenshot 2022-05-23 at 08 42 18

Any idea why this is happening guys?

leecasey commented 2 years ago

AnimatedDigitWidget( key: const ValueKey("teal"), value: permittedDays(holidays), textStyle: ThemeText.centerTextTeal, )

mingsnx commented 2 years ago

Sorry, can you tell me how to reproduce it, I can't reproduce the problem with the code above.

leecasey commented 2 years ago

sometimes it happens sometimes it doesn't. I'm not sure how to tell you how to reproduce it as its quite random. I see no pattern on when it happens.

      Column(
        children: [
          const Text(
            'Random Number',
            style: TextStyle(),
          ),
          AnimatedDigitWidget(
            key: const ValueKey("teal"),
            value: randomNumber(),
            textStyle: ThemeText.centerTextTeal,
          )
        ],
      ),
mingsnx commented 1 year ago

I'm sorry, it's been a long time, but I still can't reproduce it, maybe it's a font problem? Try the latest package and see, I will close the question first, if you still have new phenomena, you can open it again image

Column(
  children: [
    const Text(
      '{Random Number}',
      style: TextStyle(
        fontSize: 30,
        fontWeight: FontWeight.bold,
        color: Colors.blueAccent,
        fontFamily: "momofont",
      ),
    ),
    AnimatedDigitWidget(
      key: const ValueKey("teal"),
      value: Random().nextInt(DateTime.now().year),
      textStyle: TextStyle(
        fontSize: 100,
        fontWeight: FontWeight.bold,
        color: Colors.blueAccent,
        fontFamily: "momofont",
      ),
    )
  ],
),