Skip to content

Commit

Permalink
Merge pull request #114 from RotRot-pi/resolve-conflicts
Browse files Browse the repository at this point in the history
Enhance documentation for for SuperTooltip
  • Loading branch information
bensonarafat authored Oct 15, 2024
2 parents f031599 + fd3264c commit 77ee239
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 98 deletions.
125 changes: 62 additions & 63 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,63 +1,62 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.super_tooltip_example"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

// apply plugin: 'com.android.application'
// apply plugin: 'kotlin-android'
// apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.super_tooltip_example"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
12 changes: 0 additions & 12 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
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
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Empty file modified example/android/gradlew
100644 → 100755
Empty file.
39 changes: 32 additions & 7 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@


pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

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

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
// def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
// def properties = new Properties()

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
// assert localPropertiesFile.exists()
// localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
// def flutterSdkPath = properties.getProperty("flutter.sdk")
// assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
// apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
14 changes: 11 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _TargetWidgetState extends State<TargetWidget> {
@override
Widget build(BuildContext context) {
return PopScope(
onPopInvoked: (didPop) => _willPopCallback,
onPopInvokedWithResult: (didPop, result) => _willPopCallback,
child: GestureDetector(
onTap: () async {
await _controller.showTooltip();
Expand All @@ -71,12 +71,17 @@ class _TargetWidgetState extends State<TargetWidget> {
controller: _controller,
popupDirection: TooltipDirection.down,
backgroundColor: Color(0xff2f2d2f),
// showCloseButton: true,
left: 30,
right: 30,
arrowTipDistance: 15.0,
// bottom: 200,
arrowTipDistance: 20.0,
// minimumOutsideMargin: 120,
arrowBaseWidth: 20.0,
arrowLength: 20.0,
borderWidth: 2.0,
// snapsFarAwayHorizontally: true,
// snapsFarAwayVertically: true,
constraints: const BoxConstraints(
minHeight: 0.0,
maxHeight: 100,
Expand All @@ -85,9 +90,12 @@ class _TargetWidgetState extends State<TargetWidget> {
),
touchThroughAreaShape: ClipAreaShape.rectangle,
touchThroughAreaCornerRadius: 30,
// sigmaY: 10,
// sigmaX: 10,
showDropBoxFilter: true,
barrierColor: Color.fromARGB(26, 47, 45, 47),
content: const Text(
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. ",
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.",
softWrap: true,
textAlign: TextAlign.center,
style: TextStyle(
Expand Down
Loading

0 comments on commit 77ee239

Please sign in to comment.