Compare commits

..

No commits in common. "master" and "Fort-2.0.1" have entirely different histories.

5 changed files with 17 additions and 52 deletions

View File

@ -1,10 +1,3 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
@ -19,10 +12,10 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} }
/*def flutterRoot = localProperties.getProperty('flutter.sdk') def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) { if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}*/ }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
@ -34,9 +27,9 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
/*apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"*/ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 34 compileSdkVersion 34
@ -88,6 +81,6 @@ flutter {
source '../..' source '../..'
} }
/*dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}*/ }

View File

@ -1,4 +1,4 @@
/*buildscript { buildscript {
ext.kotlin_version = '1.9.0' ext.kotlin_version = '1.9.0'
repositories { repositories {
google() google()
@ -9,7 +9,7 @@
classpath 'com.android.tools.build:gradle:7.2.0' classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
}*/ }
allprojects { allprojects {
repositories { repositories {

View File

@ -1,4 +1,4 @@
/*include ':app' include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
@ -9,30 +9,3 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
*/
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.2.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}
include ":app"

View File

@ -124,8 +124,7 @@ class _ScannerDialogState extends State<ScannerDialog> {
borderRadius: 10, borderRadius: 10,
borderLength: 25, borderLength: 25,
borderWidth: 5, borderWidth: 5,
overlayColor: Colors.black.withValues(alpha: 0.55), cutOutSize: 225.0),
cutOutSize: 225.0),
onPermissionSet: (ctrl, p) => _onPermissionSet(context, ctrl, p), onPermissionSet: (ctrl, p) => _onPermissionSet(context, ctrl, p),
); );
} }

View File

@ -66,8 +66,6 @@ class _AudioPlayerFloatingContainerState extends State<AudioPlayerFloatingContai
currentpostlabel = "$minutesToShow:$secondsToShow"; currentpostlabel = "$minutesToShow:$secondsToShow";
}
if(mounted && player.duration != null) {
setState(() { setState(() {
//refresh the UI //refresh the UI
if(currentpos > player.duration!.inMilliseconds) { if(currentpos > player.duration!.inMilliseconds) {
@ -82,6 +80,8 @@ class _AudioPlayerFloatingContainerState extends State<AudioPlayerFloatingContai
} }
}); });
/*player.onPositionChanged.listen((Duration p){ /*player.onPositionChanged.listen((Duration p){
currentpos = p.inMilliseconds; //get the current position of playing audio currentpos = p.inMilliseconds; //get the current position of playing audio
@ -125,11 +125,11 @@ class _AudioPlayerFloatingContainerState extends State<AudioPlayerFloatingContai
} }
@override @override
void dispose() async { void dispose() {
Future.microtask(() async { if (player.playing) {
await player.stop(); player.stop();
await player.dispose(); }
}); player.dispose();
super.dispose(); super.dispose();
} }