Installation

This guide covers compatibility notes and how to add the flutter_tilt package.

Installation

1

Compatibility

Platform compatibility

AndroidiOSWebmacOSWindowsLinux
✅✅✅✅✅✅

Sensor compatibility

Sensors are only available on these platforms.
Platforms without sensors support do not affect the normal use of other features.

AndroidiOSWeb (HTTPS)macOSWindowsLinux
✅✅Browser compatibility❌❌❌

Note:

Currently Web uses the Sensor API - Gyroscope, but it is not compatible with some of the major browsers, such as Safari, Firefox.

2

Add flutter_tilt

Version compatibility

Min Flutter SDKFlutter
v3.0.0+
Flutter
v3.10.0+
Flutter
v3.19.0+
flutter_tilt v4.0.0+❌❌✅
flutter_tilt v3.0.0+❌❌✅
flutter_tilt v2.0.0+❌✅✅
flutter_tilt v1.0.0+✅❌❌

Add flutter_tilt

Run this command with Flutter,

$ flutter pub add flutter_tilt

or add flutter_tilt to pubspec.yaml dependencies manually.

pubspec.yaml
...
dependencies:
  flutter_tilt: latest_version
...
3

Import flutter_tilt

Now in your Dart code, you can use:

import 'package:flutter_tilt/flutter_tilt.dart';