rotate_x 0.0.4 copy "rotate_x: ^0.0.4" to clipboard
rotate_x: ^0.0.4 copied to clipboard

rotating an image must be easy as x.

RotateX (rotate_x) #

We just need a package that allows us to rotate an image.

Example1 Example2
Screenshot example1 Screenshot example2

Features #

  • Smooth image rotation with angle control
  • Optional scale adjustment during rotation to maintain visibility
  • Built-in controller for external rotation control
  • Image capture/export capability

Example #

// Import package
import 'package:rotate_x/rotate_x.dart';

...

RotateXController controller = RotateXController();

...

RotateX(
    controller: controller,
    image: Image.network(
        'https://picsum.photos/300/500',
    ),
    scaleFollowsRotation: true,
),
// This is an example of how to use the controller to rotate the image
Slider(
    value: sliderValue,
    onChanged: (value) {
        setState(() {
            controller.angle = (value * 0.5 * pi) - (pi / 4); // THIS IS AN EXAMPLE OF HOW TO USE THE CONTROLLER TO ROTATE THE IMAGE
            sliderValue = value;
        });
    },
),

// if you want to save the image, you can use the `toUint8List` function
TextButton(
    onPressed: controller.save,
    child: const Text('Save'),
)

1
likes
150
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

rotating an image must be easy as x.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

equatable, flutter, vector_math

More

Packages that depend on rotate_x