Skip to content

Commit

Permalink
Merge: branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Oct 21, 2024
2 parents 85076e2 + 23c150d commit 83bcbaa
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

- Add `Tilt.lightShadowMode` and configuration. ([#12](https://github.com/fluttercandies/flutter_tilt/pull/12))

## 3.1.0

### Improvements

- Bump `sensors_plus` package from `6.0.0` to `6.1.0`. ([#20](https://github.com/fluttercandies/flutter_tilt/pull/20))
- Migrate the example to Android Studio Ladybug (JDK 21). ([#19](https://github.com/fluttercandies/flutter_tilt/pull/19))

## 3.0.6

### Improvements
Expand Down
27 changes: 19 additions & 8 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@

- [版本兼容](#版本兼容-)

- [平台兼容](#平台兼容-)

- [添加 flutter_tilt](#添加-flutter_tilt-)

- [传感器兼容](#传感器兼容-)
- [传感器兼容][]

- [手势优先级](#手势优先级-)

Expand Down Expand Up @@ -100,7 +102,7 @@
- 🔦 光照效果
- 💡 阴影效果
- 👀 视差效果
- 📱 陀螺仪传感器支持([传感器兼容](#传感器兼容-)
- 📱 陀螺仪传感器支持([传感器兼容][]
- 🧱 多种布局位置
- 👇 支持鼠标、触摸和传感器事件
- 🖼️ 流畅的动画
Expand All @@ -117,6 +119,13 @@
| flutter_tilt 1.0.0+ ||||


### 平台兼容 📱

| Android | iOS | Web | macOS | Windows | Linux |
| :-----: | :---: | :---: | :---: | :-----: | :---: |
|||||||


### 添加 flutter_tilt 📦

使用 Flutter 运行以下指令,
Expand All @@ -129,17 +138,18 @@ $ flutter pub add flutter_tilt

```yaml
dependencies:
flutter_tilt: ^latest_version
flutter_tilt: ^最新版本
```
## 传感器兼容 📱
## 传感器兼容 📱
传感器仅在以下平台触发。
传感器仅在以下平台触发。
不支持传感器的平台不会影响其他功能的正常使用。
| Android | iOS | Web (HTTPS) | macOS | Linux | Windows |
| :-----: | :---: | :------------------------------------------: | :---: | :---: | :-----: |
| ✅ | ✅ | [浏览器兼容][Gyroscope Browser compatibility] | ❌ | ❌ | ❌ |
| Android | iOS | Web (HTTPS) | macOS | Windows | Linux |
| :-----: | :---: | :------------------------------------------: | :---: | :-----: | :---: |
| ✅ | ✅ | [浏览器兼容][Gyroscope Browser compatibility] | ❌ | ❌ | ❌ |
> [!NOTE]
> 目前 Web 使用 [Sensor API - Gyroscope][],但它不兼容部分主流浏览器,比如 Safari、Firefox。
Expand Down Expand Up @@ -411,6 +421,7 @@ tiltStreamController.add(
[在线示例]: https://amoshuke.github.io/flutter_tilt_book
[迁移指南]: https://github.com/fluttercandies/flutter_tilt/blob/main/guides/migration_guide.md
[flutter_tilt/example]: https://github.com/fluttercandies/flutter_tilt/tree/main/example
[传感器兼容]: #传感器兼容-
[Tilt widget 参数]: #tilt-widget-参数-
[TiltParallax widget 参数]: #tiltparallax-widget-参数-
[ChildLayout]: #childlayout-
Expand Down
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ Check out the [Live Demo][].

- [Versions compatibility](#versions-compatibility-)

- [Platforms compatibility](#platforms-compatibility-)

- [Add package](#add-package-)

- [Sensors compatibility](#sensors-compatibility-)
- [Sensors compatibility][]

- [Gesture priority](#gesture-priority-)
- [Gestures priority](#gestures-priority-)

- [Simple usage](#simple-usage-)

Expand Down Expand Up @@ -100,7 +102,7 @@ Check out the [Live Demo][].
- 🔦 Light effect
- 💡 Shadow effect
- 👀 Parallax effect
- 📱 Gyroscope sensor support ([Sensors compatibility](#sensors-compatibility-))
- 📱 Gyroscope sensor support ([Sensors compatibility][])
- 🧱 Multiple layouts
- 👇 Supports hover, touch and sensors events
- 🖼️ Smooth animation
Expand All @@ -117,6 +119,13 @@ Check out the [Live Demo][].
| flutter_tilt 1.0.0+ ||||


### Platforms compatibility 📱

| Android | iOS | Web | macOS | Windows | Linux |
| :-----: | :---: | :---: | :---: | :-----: | :---: |
|||||||


### Add package 📦

Run this command with Flutter,
Expand All @@ -133,20 +142,21 @@ dependencies:
```
## Sensors compatibility 📱
## Sensors compatibility 📱
Sensors are triggered only on these platforms.
Sensors will only trigger on these platforms.
Platforms without sensors support do not affect the normal use of other features.
| Android | iOS | Web (HTTPS) | macOS | Linux | Windows |
| :-----: | :---: | :------------------------------------------------------: | :---: | :---: | :-----: |
| ✅ | ✅ | [Browser compatibility][Gyroscope Browser compatibility] | ❌ | ❌ | ❌ |
| Android | iOS | Web (HTTPS) | macOS | Windows | Linux |
| :-----: | :---: | :------------------------------------------------------: | :---: | :-----: | :---: |
| ✅ | ✅ | [Browser compatibility][Gyroscope 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.
<!-- > After that maybe replace it with [DeviceMotionEvent][]. -->
## Gesture priority 📱
## Gestures priority 📱
When multiple gestures are enabled, they are triggered based on priority:
Expand Down Expand Up @@ -411,6 +421,7 @@ Open sourced under the MIT license.
[Live Demo]: https://amoshuke.github.io/flutter_tilt_book
[Migration Guide]: https://github.com/fluttercandies/flutter_tilt/blob/main/guides/migration_guide.md
[flutter_tilt/example]: https://github.com/fluttercandies/flutter_tilt/tree/main/example
[Sensors compatibility]: #sensors-compatibility-
[Tilt widget parameters]: #tilt-widget-parameters-
[TiltParallax widget parameters]: #tiltparallax-widget-parameters-
[ChildLayout]: #childlayout-
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
android {
namespace = "com.example.example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
ndkVersion = "25.1.8937393" // flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version "8.3.2" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

Expand Down
2 changes: 2 additions & 0 deletions lib/flutter_tilt.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/// Easily apply tilt parallax hover effects for Flutter,
/// which supports tilt, light, shadow effects, gyroscope sensors and many custom parameters.
// ignore: unnecessary_library_name
library flutter_tilt;

export 'src/config/tilt_config.dart';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
flutter:
sdk: flutter
stream_transform: ^2.1.0
sensors_plus: ^6.0.0
sensors_plus: ^6.1.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 83bcbaa

Please sign in to comment.