jonataslaw / getx

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
MIT License
10.35k stars 1.63k forks source link

Multiple issues in get_animations #3233

Open bigbott opened 3 weeks ago

bigbott commented 3 weeks ago
  1. slide does not work.

    
               Text(
                  'Slide',
                  style: TextStyle(fontSize: 20),
                ).slide(
                  duration: Duration(milliseconds: 500),
                 begin: 0.5,
                 end: 7,
    
                  offset: (context, offset) {
                    return Offset(-10, 25);
                  },               
                ),

    Just nothing happens

  2. blur is applied not to the current widget but to the above widgets

        Text(
              'Blur',
              style: TextStyle(fontSize: 20),
            ).blur(
                duration: Duration(milliseconds: 500),
               ),

The Text widget will not be blurred but will be blurred all widgets above it.

  1. When the widget is rebuild using GetBuilder animation is not played
GetBuilder<AnimatedPuppyController>(
                builder: (controller) {
                  print('rebuild');
                  return Image(
                    image: const AssetImage('assets/images/puppy.png'),
                    width: controller.read(),
                  ).spin(onComplete: (animationController) {
                  // animationController.stop();
                   // animationController.dispose();
                  },);
                },
              ),

The animation played only the first time when the page is loaded. When the Image widget gets rebuilt by GetBuilder nothing happens.

fisforfaheem commented 3 weeks ago

@jonataslaw Kindly