MarcelGarus / marquee

A Flutter widget that scrolls text infinitely. Provides many customizations including custom scroll directions and velocities, pausing after every round and specifying custom durations and curves for accelerating and decelerating.
MIT License
284 stars 135 forks source link

The movement is strange when there is shadow in text style. #47

Open eunjin3786 opened 3 years ago

eunjin3786 commented 3 years ago

Text does not flow naturally when I run this code

Marquee(
            text: "Hello",
            style: TextStyle(
                color: Colors.green[100],
                fontSize: 100,
                shadows: [
                  Shadow(color: Colors.green[300], blurRadius: 20 / 2),
                  Shadow(color: Colors.green[400], blurRadius: 20),
                  Shadow(color: Colors.green[500], blurRadius: 20 * 3.0)
                ]
            ),
            scrollAxis: Axis.horizontal,
            crossAxisAlignment: CrossAxisAlignment.center,
            blankSpace: 20,
            velocity: 300,
            pauseAfterRound: Duration(seconds: 0),
            startPadding: 10.0,
          );
        }

ezgif-5-d7f7bf2a7b0f

eunjin3786 commented 3 years ago

It's strange only on the simulator. It's okay on the device...!!

MarcelGarus commented 3 years ago

That is pretty weird. I suppose, rendering text shadows is pretty resource intensive. Although the widget should actually only render the texts as they newly come into view and use cached versions the rest of the time. Since this only affects the simulator, I don't think I'll take any further action. Is this still a priority problem for you?