The Flutter Material switch is not animated on my Android device, but it is animated on iOS.

I'm using the non-adaptive version of the Widget (so this means that on both OSs, I'm drawing the Material style widget).

On iOS, the transition from on to off state is smooth and continuous. On Android, upon tap, it just jumps to the new state immediately.

When I "pull" the switch (leaving my finger or the circle, then moving slowly from "on" state to "off" state), I can see the "in-between" states.

// on stateful widget:
bool _b = true;
// in build method
  value: _b,
  onChanged: (bool b) {
    setState(() {
      _b = b;
), // etc..

1 Answers

BertC On

@Vince, I copied your code in my project and ran it on Android Emulator. No problem, it works as expected.

My Android Emulator is upgraded to the latest version. Maybe that's the problem? Otherwise please post a full App example (full program in main.dart), and then we might see the problem.