zoomable_tilt_view

ZoomableTiltView is simple widget to add some juiciness to your app.

Example gif

Usage

Simply import the package and wrap it inside ZoomableTiltView widget.

import 'package:zoomable_tilt_view/zoomable_tilt_view.dart';

Example

ZoomableTiltView(
  yTiltLimit: 50,
  xTiltLimit: 50,
  tiltSensitivity: 1.5,
  zoomLimit: 1.8,
  child: Container(
    height: 200,
    width: 200,
    color: Colors.pinkAccent,
    child: Center(
      child: Text(
        "HIREME",
        style: TextStyle(
          fontSize: 24,
          fontWeight: FontWeight.bold,
          color: Colors.white,
        ),
      ),
    ),
  ),
),

Parameters

ParameterDefaultDescription
yTiltLimit int25How much the child can tilt on Y axis. Must be positive number.
xTiltLimit int25How much the child can tilt on X axis. Must be positive number.
tiltSensitivity double1.0How much the child tilts.
tiltResetAnimationDuration DurationDuration(milliseconds: 900)How fast the tilt resets after you release the hold.
zoomLimit double1.2How much the child zooms when on press.
zoomAnimationDuration DurationDuration(milliseconds: 250)How long it takes to zoom in/out on press/release.
zoomAlignment AlignmentAlignment.centerWhich direction the child scales when pressed. Useful if the child is near edges of the screen.

Libraries

zoomable_tilt_view