Skip to content

Commit dcbd332

Browse files
Merge pull request #207 from RafaelBarbosatec/fix/disable-tap-while-animate
Disable tap while animate
2 parents e18793b + 7c44d40 commit dcbd332

20 files changed

+225
-180
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.13
2+
- Disable tap while animate. Fix issue [#205](https://github.com/RafaelBarbosatec/tutorial_coach_mark/issues/205)
3+
14
# 1.2.12
25
- Change moment where call `_controller.forward()` occurs. That prevents the `unFocusAnimationDuration` is always called;
36
- Update `onSkip` in `README`

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,26 @@ void showTutorial() {
2222
TutorialCoachMark tutorial = TutorialCoachMark(
2323
targets: targets, // List<TargetFocus>
2424
colorShadow: Colors.red, // DEFAULT Colors.black
25+
// opacityShadow = 0.8,
2526
// alignSkip: Alignment.bottomRight,
2627
// textSkip: "SKIP",
28+
// textStyleSkip: const TextStyle(color: Colors.white),
29+
// skipWidget: MyWidget(),
30+
// hideSkip: false
31+
// showSkipInLastTarget: true,
2732
// paddingFocus: 10,
2833
// focusAnimationDuration: Duration(milliseconds: 500),
2934
// unFocusAnimationDuration: Duration(milliseconds: 500),
3035
// pulseAnimationDuration: Duration(milliseconds: 500),
3136
// pulseVariation: Tween(begin: 1.0, end: 0.99),
32-
// showSkipInLastTarget: true,
37+
// pulseEnable: true,
3338
// imageFilter: ImageFilter.blur(sigmaX: 8, sigmaY: 8),
3439
// initialFocus: 0,
3540
// useSafeArea: true,
41+
// finish: (){},
42+
// clickTarget: (TargetFocus) {},
43+
// onClickTargetWithTapPosition: (TargetFocus, TapDownDetails) {},
44+
// clickOverlay: (TargetFocus) {},
3645
onFinish: (){
3746
print("finish");
3847
},

example/.metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ migration:
1515
- platform: root
1616
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
1717
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
18-
- platform: linux
18+
- platform: android
1919
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
2020
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
2121

example/android/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ gradle-wrapper.jar
77
GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
10+
# See https://flutter.dev/to/reference-keystore
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,44 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
226
}
237

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion 31
9+
namespace = "com.rafaelbarbosatec.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
16+
}
3017

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
3320
}
3421

3522
defaultConfig {
3623
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37-
applicationId "com.rafaelbarbosatec.example"
38-
minSdkVersion 16
39-
targetSdkVersion 31
40-
versionCode flutterVersionCode.toInteger()
41-
versionName flutterVersionName
24+
applicationId = "com.rafaelbarbosatec.example"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4231
}
4332

4433
buildTypes {
4534
release {
4635
// TODO: Add your own signing config for the release build.
4736
// Signing with the debug keys for now, so `flutter run --release` works.
48-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
4938
}
5039
}
5140
}
5241

5342
flutter {
54-
source '../..'
55-
}
56-
57-
dependencies {
58-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43+
source = "../.."
5944
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rafaelbarbosatec.example">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rafaelbarbosatec.example">
3-
<application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
43
android:label="example"
4+
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
88
android:exported="true"
99
android:launchMode="singleTop"
10+
android:taskAffinity=""
1011
android:theme="@style/LaunchTheme"
1112
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1213
android:hardwareAccelerated="true"
@@ -19,15 +20,6 @@
1920
android:name="io.flutter.embedding.android.NormalTheme"
2021
android:resource="@style/NormalTheme"
2122
/>
22-
<!-- Displays an Android View that continues showing the launch screen
23-
Drawable until Flutter paints its first frame, then this splash
24-
screen fades out. A splash screen is useful to avoid any visual
25-
gap between the end of Android's launch screen and the painting of
26-
Flutter's first frame. -->
27-
<meta-data
28-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
29-
android:resource="@drawable/launch_background"
30-
/>
3123
<intent-filter>
3224
<action android:name="android.intent.action.MAIN"/>
3325
<category android:name="android.intent.category.LAUNCHER"/>
@@ -39,4 +31,15 @@
3931
android:name="flutterEmbedding"
4032
android:value="2" />
4133
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
4245
</manifest>

example/android/app/src/main/kotlin/com/rafaelbarbosatec/example/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package com.rafaelbarbosatec.example
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity: FlutterActivity()

example/android/app/src/main/res/values-night/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

example/android/app/src/main/res/values/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rafaelbarbosatec.example">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

example/android/build.gradle

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
1-
buildscript {
2-
ext.kotlin_version = '1.6.10'
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
17-
jcenter()
4+
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
2411
}
2512
subprojects {
26-
project.evaluationDependsOn(':app')
13+
project.evaluationDependsOn(":app")
2714
}
2815

2916
tasks.register("clean", Delete) {

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

example/android/settings.gradle

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "7.3.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
}
24+
25+
include ":app"

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class MyHomePageState extends State<MyHomePage> {
6363
),
6464
PopupMenuButton(
6565
key: keyButton1,
66-
icon: const Icon(Icons.view_list, color: Colors.white),
66+
icon: const Icon(Icons.view_list, color: Colors.black),
6767
itemBuilder: (context) => [
6868
const PopupMenuItem(
6969
child: Text("Is this"),

0 commit comments

Comments
 (0)