marquee icon indicating copy to clipboard operation
marquee copied to clipboard

_CastError (Null check operator used on a null value)

Open dineshkumar02 opened this issue 2 years ago • 2 comments

Hi @MarcelGarus ,

Thank you for this wonderful library, as it is part of my project.

But I have some hiccups while using this library, and sometimes it's crashing by throwing the below error.

_CastError (Null check operator used on a null value)

Screenshot 2022-08-22 012555

I am using the latest version of marquee (2.2.3), and below are my flutter version details.

    • Flutter version 3.0.5 at C:\Users\dines\workspace\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2


And I am using marquee as below, which is causing the exception


Container(
            decoration: BoxDecoration(
              color: Theme.of(context).colorScheme.primaryContainer,
            ),
            height: Adaptive.h(4),
        
            child: Marquee(
              text: announce.announce,
              style: Theme.of(context).textTheme.bodyLarge!.copyWith(
                  color: Theme.of(context).colorScheme.onPrimaryContainer),
              scrollAxis: Axis.horizontal,
              crossAxisAlignment: CrossAxisAlignment.start,
              blankSpace: Adaptive.w(50),
              velocity: 10.0,
              numberOfRounds: null,
              pauseAfterRound: Duration(seconds: 1),
              startPadding: 10.0,
              accelerationDuration: Duration(seconds: 1),
              accelerationCurve: Curves.easeIn,
              decelerationDuration: Duration(milliseconds: 500),
              decelerationCurve: Curves.easeOut,
            ),
          )

This actually happens, while scrolling the Listview where Marquee is one of it's children.

Please let me know if I miss anything here.

dineshkumar02 avatar Aug 21 '22 20:08 dineshkumar02

I have the same problems:(

wanhongbo avatar Oct 25 '22 08:10 wanhongbo

@MarcelGarus Same issue here also

abhilashsajeev avatar Mar 23 '23 07:03 abhilashsajeev