fluttercandies / flutter_tilt

👀 Easily apply tilt parallax hover effects for Flutter, which supports tilt, light, shadow effects, and gyroscope sensors | 为 Flutter 轻松创建倾斜视差悬停效果,支持倾斜、光照、阴影效果和陀螺仪传感器
https://pub.dev/packages/flutter_tilt
MIT License
145 stars 6 forks source link

[Feature] Disable Features on Low Power Mode #7

Closed SethuSenthil closed 9 months ago

SethuSenthil commented 10 months ago

It would be great if there was a global option, per widget option to turn off the tilt, or sensor-based tilt on low power mode to preserve the battery, thank!

AmosHuKe commented 10 months ago

@SethuSenthil hi~ If you want to turn off the sensor in low power mode, You can configure TiltConfig -> enableGestureSensors to turn off the sensors completely.

Currently, You will need to determine the low power mode before you can configure it. Other gestures (touch, hover) still work.

Tilt(
  TiltConfig: TiltConfig(
    enableGestureSensors: false,
  ),
  child: ......
)