rotation_three_d_effect 0.1.3 copy "rotation_three_d_effect: ^0.1.3" to clipboard
rotation_three_d_effect: ^0.1.3 copied to clipboard

A Flutter package that allows to apply a Three Dimensional roatation to any widget, also allowing the user to rotate it as they whish.

example/main.dart

import 'package:flutter/material.dart';
import 'package:rotation_three_d_effect/rotation_three_d_effect.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Rotation3DEffect.limitedReturnsInPlace(
                  child: Text(
                'Hello 3D Rotation! \n(Returns in place)',
                style: TextStyle(fontSize: 35),
              )),
              const SizedBox(
                height: 50,
              ),
              Rotation3DEffect.limited(
                maximumPan: 80,
                child: FilledButton.tonal(
                    onPressed: () {},
                    child:
                        const Text("Limited 3D Rotation (No return in place)")),
              ),
              const SizedBox(
                height: 50,
              ),
              const Text("Unrestriced 3D Rotation"),
              const Rotation3DEffect(
                  child: FlutterLogo(
                size: 150,
              )),

              const SizedBox(
                height: 50,
              ),

              Rotation3DEffect(
                maximumPan: 30,
                returnsInPlace: true,
                returnInPlaceDuration: const Duration(seconds: 1),
                child: Card(
                  elevation: 6,
                  color: Colors.amber[300],
                  shadowColor: Colors.black,
                  child: const SizedBox(
                    height: 160,
                    width: 300,
                    child: Center(child: Text("Rotating Card")),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
0
pub points
39%
popularity

Publisher

unverified uploader

A Flutter package that allows to apply a Three Dimensional roatation to any widget, also allowing the user to rotate it as they whish.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on rotation_three_d_effect