Skip to content

Commit 2250151

Browse files
committed
fix(zoom): properly handle onTap for zoom, version: 2.0.1
1 parent c0feb49 commit 2250151

File tree

8 files changed

+29
-9
lines changed

8 files changed

+29
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.1
2+
3+
* Fixed a minor bug with zoom gestures not working properly on mobile platforms.
4+
15
## 2.0.0
26

37
* Fixed a bug where using keyboard shortcuts with the color picker would spam a lot of errors in the console.

example/android/app/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,21 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 30
29+
compileSdkVersion 31
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
3333
}
3434

35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
3539
defaultConfig {
3640
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3741
applicationId "com.example.example"
38-
minSdkVersion 16
39-
targetSdkVersion 30
42+
minSdkVersion 21
43+
targetSdkVersion 31
4044
versionCode flutterVersionCode.toInteger()
4145
versionName flutterVersionName
4246
}

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<activity
77
android:name=".MainActivity"
88
android:launchMode="singleTop"
9+
android:exported="true"
910
android:theme="@style/LaunchTheme"
1011
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1112
android:hardwareAccelerated="true"

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.7.10'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.2.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
path: ".."
7474
relative: true
7575
source: path
76-
version: "2.0.0"
76+
version: "2.0.1"
7777
js:
7878
dependency: transitive
7979
description:

lib/src/inspector.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ class _InspectorState extends State<Inspector> {
139139
return;
140140
}
141141

142+
if (_zoomStateNotifier.value) {
143+
_onZoomStateChanged(false);
144+
return;
145+
}
146+
142147
if (!_inspectorStateNotifier.value) {
143148
return;
144149
}
@@ -163,9 +168,15 @@ class _InspectorState extends State<Inspector> {
163168
}
164169

165170
void _onPointerMove(Offset pointerOffset) {
171+
_pointerHoverPosition = pointerOffset;
172+
166173
if (_colorPickerStateNotifier.value) {
167174
_onColorPickerHover(pointerOffset);
168175
}
176+
177+
if (_zoomStateNotifier.value) {
178+
_onZoomHover(pointerOffset);
179+
}
169180
}
170181

171182
void _onPointerHover(Offset pointerOffset) {

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: inspector
2-
description: A Flutter package for inspecting widget size and color. Useful for quick debugging or QA testing.
3-
version: 2.0.0
2+
description: A Flutter package for inspecting widgets. Useful for quick debugging or QA testing.
3+
version: 2.0.1
44
homepage: https://github.com/kekland/inspector
55

66
environment:

0 commit comments

Comments
 (0)