diff --git a/CHANGELOG.md b/CHANGELOG.md index 17deaec..ba166ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.6.1 + +- REVISED: Disabled the tilt effect on mobile devices. + ## 2.6.0 - NEW: Added a tilt effect `TiltHandler` to the floating thumbnail and project thumbnail. diff --git a/lib/widgets/tilt_handler.dart b/lib/widgets/tilt_handler.dart index b1cb780..5a13258 100644 --- a/lib/widgets/tilt_handler.dart +++ b/lib/widgets/tilt_handler.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:math' as math; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_tilt/flutter_tilt.dart'; @@ -86,6 +87,12 @@ class _TiltHandlerState extends State @override Widget build(BuildContext context) { + // Omit the tilt effect on mobile platforms. + if (defaultTargetPlatform == TargetPlatform.android || + defaultTargetPlatform == TargetPlatform.iOS) { + return widget.child; + } + return Tilt( tiltStreamController: tiltStreamController, tiltConfig: TiltConfig( diff --git a/pubspec.yaml b/pubspec.yaml index fb8e710..d0b61f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: plg_portfolio description: Pablo L. Guerra's web-app portfolio powered by Flutter. publish_to: "none" -version: 2.6.0+60 +version: 2.6.1+61 environment: sdk: ">=3.1.1 <4.0.0"