From 87b01eae871ed70004be02737b628b235a8e6516 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Sun, 10 Nov 2024 13:28:59 +0100 Subject: [PATCH 01/11] Updated TextTheme Updated TextTheme properties to new equivalents" git push origin main --- example/lib/main.dart | 2 +- lib/src/widgets/birthday_widget.dart | 2 +- lib/src/widgets/checkout/checkout_widget.dart | 4 ++-- lib/src/widgets/custom_dialog.dart | 4 ++-- lib/src/widgets/otp_widget.dart | 2 +- lib/src/widgets/pin_widget.dart | 2 +- lib/src/widgets/sucessful_widget.dart | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 87a7123e..bc5c5c84 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -156,7 +156,7 @@ class _HomePageState extends State { primaryColorLight: Colors.white, primaryColorDark: navyBlue, textTheme: Theme.of(context).textTheme.copyWith( - bodyText2: TextStyle( + bodyMedium: TextStyle( color: lightBlue, ), ), diff --git a/lib/src/widgets/birthday_widget.dart b/lib/src/widgets/birthday_widget.dart index 20449a42..a7b1b726 100644 --- a/lib/src/widgets/birthday_widget.dart +++ b/lib/src/widgets/birthday_widget.dart @@ -45,7 +45,7 @@ class _BirthdayWidgetState extends BaseState { textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.w500, - color: context.textTheme().headline6?.color, + color: context.textTheme().titleLarge?.color, fontSize: 15.0, ), ), diff --git a/lib/src/widgets/checkout/checkout_widget.dart b/lib/src/widgets/checkout/checkout_widget.dart index 6e467620..07428ec7 100644 --- a/lib/src/widgets/checkout/checkout_widget.dart +++ b/lib/src/widgets/checkout/checkout_widget.dart @@ -188,7 +188,7 @@ class _CheckoutWidgetState extends BaseState Text( 'Pay', style: TextStyle( - fontSize: 14.0, color: context.textTheme().headline1?.color), + fontSize: 14.0, color: context.textTheme().displayLarge?.color), ), SizedBox( width: 5.0, @@ -197,7 +197,7 @@ class _CheckoutWidgetState extends BaseState child: Text(Utils.formatAmount(_charge.amount), style: TextStyle( fontSize: 15.0, - color: context.textTheme().headline6?.color, + color: context.textTheme().titleLarge?.color, fontWeight: FontWeight.bold))) ], ) diff --git a/lib/src/widgets/custom_dialog.dart b/lib/src/widgets/custom_dialog.dart index 4faa5333..8b269f02 100644 --- a/lib/src/widgets/custom_dialog.dart +++ b/lib/src/widgets/custom_dialog.dart @@ -33,7 +33,7 @@ class CustomAlertDialog extends StatelessWidget { children.add(new Padding( padding: titlePadding!, child: new DefaultTextStyle( - style: context.textTheme().headline6!, + style: context.textTheme().titleLarge!, child: new Semantics(child: title, namesRoute: true), ), )); @@ -43,7 +43,7 @@ class CustomAlertDialog extends StatelessWidget { child: new Padding( padding: contentPadding, child: new DefaultTextStyle( - style: context.textTheme().subtitle1!, + style: context.textTheme().titleMedium!, child: content, ), ), diff --git a/lib/src/widgets/otp_widget.dart b/lib/src/widgets/otp_widget.dart index f0f74a70..72788f9f 100644 --- a/lib/src/widgets/otp_widget.dart +++ b/lib/src/widgets/otp_widget.dart @@ -42,7 +42,7 @@ class _OtpWidgetState extends BaseState { textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.w500, - color: context.textTheme().headline6?.color, + color: context.textTheme().titleLarge?.color, fontSize: 15.0, ), ), diff --git a/lib/src/widgets/pin_widget.dart b/lib/src/widgets/pin_widget.dart index 124dabd8..28b43423 100644 --- a/lib/src/widgets/pin_widget.dart +++ b/lib/src/widgets/pin_widget.dart @@ -38,7 +38,7 @@ class _PinWidgetState extends BaseState { textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.w500, - color: context.textTheme().headline6?.color, + color: context.textTheme().titleMedium?.color, fontSize: 15.0, ), ), diff --git a/lib/src/widgets/sucessful_widget.dart b/lib/src/widgets/sucessful_widget.dart index dc669431..79dd546d 100644 --- a/lib/src/widgets/sucessful_widget.dart +++ b/lib/src/widgets/sucessful_widget.dart @@ -86,7 +86,7 @@ class _SuccessfulWidgetState extends State Text( 'Payment Successful', style: TextStyle( - color: context.textTheme().headline6?.color, + color: context.textTheme().titleLarge?.color, fontWeight: FontWeight.w500, fontSize: 16.0, ), @@ -98,7 +98,7 @@ class _SuccessfulWidgetState extends State ? new Container() : new Text('You paid ${Utils.formatAmount(widget.amount)}', style: TextStyle( - color: context.textTheme().headline6?.color, + color: context.textTheme().titleLarge?.color, fontWeight: FontWeight.normal, fontSize: 14.0, )), From 8dd638cf106610da143780e48b544b9e93f5dca7 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:51:19 +0100 Subject: [PATCH 02/11] Update build.gradle Summary of Changes: Moved ext.kotlin_version to buildscript. Updated lintOptions to lint if compatible with your Gradle version. Commented options for Java and Kotlin compatibility targeting Java 1.8 or 17. --- example/android/app/build.gradle | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 7e28387a..88d9144f 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -15,21 +15,32 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +buildscript { + ext.kotlin_version = '1.7.10' // Set Kotlin version here + repositories { + google() + mavenCentral() + } + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + android { - compileSdkVersion 32 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' } - lintOptions { - disable 'InvalidPackage' + lint { + disable 'InvalidPackage' // Use `lint` if your Gradle version supports it } defaultConfig { applicationId "co.paystack.flutterpaystack" minSdkVersion 16 - targetSdkVersion 32 + targetSdkVersion 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -40,8 +51,17 @@ android { signingConfig signingConfigs.debug } } + + kotlinOptions { + jvmTarget = "1.8" // Set to "17" if using Java 17 + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed + targetCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed + } } flutter { source '../..' -} \ No newline at end of file +} From a5988a78566dc7e3af002370ce573f95b7f836d3 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 04:18:23 +0100 Subject: [PATCH 03/11] refactored the build.graddle --- example/android/app/build.gradle | 79 +++++++++---------- example/android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 39 insertions(+), 44 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 88d9144f..8eef069d 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,67 +1,62 @@ +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 localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + 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" } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -buildscript { - ext.kotlin_version = '1.7.10' // Set Kotlin version here - repositories { - google() - mavenCentral() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } +def flutterVersionName = localProperties.getProperty("flutter.versionName") +if (flutterVersionName == null) { + flutterVersionName = "1.0" } android { - compileSdkVersion 33 + applicationId "co.paystack.flutterpaystack" + compileSdk = 34 + ndkVersion = flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lint { - disable 'InvalidPackage' // Use `lint` if your Gradle version supports it + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { - applicationId "co.paystack.flutterpaystack" - minSdkVersion 16 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.softdelaxe.rent24" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdk = 16 + targetSdk = 34 + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } - + kotlinOptions { + jvmTarget = "1.8" + } buildTypes { release { - signingConfig signingConfigs.debug + // 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 } } - - kotlinOptions { - jvmTarget = "1.8" // Set to "17" if using Java 17 } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed - targetCompatibility = JavaVersion.VERSION_1_8 // Change to 17 if needed - } -} - + flutter { source '../..' -} +} \ No newline at end of file diff --git a/example/android/build.gradle b/example/android/build.gradle index bef5f7b2..9065050a 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 97c775ed..600513b7 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip From 0adc918214a40f4496b3e342638d74406eac638c Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:01:44 +0100 Subject: [PATCH 04/11] Gradle update updated compile sdk to version 34 updated the target sdk to version 34 updated the java version to 1.8 updated the kotlin version to 1.8 --- android/build.gradle | 13 +++++++++++-- example/android/app/build.gradle | 15 +++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 17a89c3d..75965ede 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ group 'co.paystack.flutterpaystack' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.7.20' + ext.kotlin_version = '1.8' repositories { mavenCentral() google() @@ -25,17 +25,26 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 32 + compileSdkVersion 34 sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { + targetSdkVersion 34 minSdkVersion 16 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" versionCode 21 versionName "3.0.10" } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } lintOptions { disable 'InvalidPackage' } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8eef069d..e23db122 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -22,7 +22,6 @@ def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { flutterVersionName = "1.0" } - android { applicationId "co.paystack.flutterpaystack" compileSdk = 34 @@ -34,29 +33,25 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.softdelaxe.rent24" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdk = 16 targetSdk = 34 versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "1.8" // Ensure this is set to 1.8 to match Java compatibility } + 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 '../..' } \ No newline at end of file From f34a21566407558fbbec55ea9fdc3b6f1c3b429d Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:12:12 +0100 Subject: [PATCH 05/11] Update build.gradle updated the kotlin version to 1.8 --- example/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/android/build.gradle b/example/android/build.gradle index 9065050a..e59557f0 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.10' + ext.kotlin_version = '1.8' repositories { google() jcenter() From c4a67772f4c2404b02cc0095660a39ea051b4b93 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:18:32 +0100 Subject: [PATCH 06/11] updated the kotlin version --- example/android/app/build.gradle | 2 +- example/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index e23db122..aca5e0d2 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -41,7 +41,7 @@ android { } kotlinOptions { - jvmTarget = "1.8" // Ensure this is set to 1.8 to match Java compatibility + jvmTarget = "1.8.0" // Ensure this is set to 1.8 to match Java compatibility } buildTypes { diff --git a/example/android/build.gradle b/example/android/build.gradle index e59557f0..76f618e9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.8' + ext.kotlin_version = '1.8.0' repositories { google() jcenter() From 447562fd9ec68fac7631333a037f5e3dbf07be11 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:52:10 +0100 Subject: [PATCH 07/11] Update gradle-wrapper.properties --- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 8212ba0d..6fac757d 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip From fe7032bc0fdd830e87c8cb94e26ca4b53638d264 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:46:41 +0100 Subject: [PATCH 08/11] Update build.gradle --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 75965ede..2f903bcd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ group 'co.paystack.flutterpaystack' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.8' + ext.kotlin_version = '1.8.0' repositories { mavenCentral() google() From 3b65ab5f3f1981fc0158b5e907f72fafabeccd68 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:58:41 +0100 Subject: [PATCH 09/11] adding a range to gradle '>=1.7.20 <2.0' --- android/build.gradle | 2 +- example/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 2f903bcd..4896f2ca 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ group 'co.paystack.flutterpaystack' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.8.0' + ext.kotlin_version = '>=1.7.20 <2.0' repositories { mavenCentral() google() diff --git a/example/android/build.gradle b/example/android/build.gradle index 76f618e9..7a383f61 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.8.0' + ext.kotlin_version = '>=1.7.20 <2.0' repositories { google() jcenter() From ba3f574c02d98f87ad9d5ff8a4b916fa777af6e3 Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:08:11 +0100 Subject: [PATCH 10/11] Update build.gradle --- example/android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index aca5e0d2..8963775e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -41,7 +41,7 @@ android { } kotlinOptions { - jvmTarget = "1.8.0" // Ensure this is set to 1.8 to match Java compatibility + jvmTarget = '>=1.7.20 <2.0' // Ensure this is set to 1.8 to match Java compatibility } buildTypes { From c3dbca352f1a19fa3971fae123b6ec8cced9722b Mon Sep 17 00:00:00 2001 From: Ikechukwu <98517818+softdelaxe@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:29:33 +0100 Subject: [PATCH 11/11] updated the gradle version --- android/build.gradle | 2 +- example/android/app/build.gradle | 4 ++-- example/android/build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4896f2ca..2f903bcd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ group 'co.paystack.flutterpaystack' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '>=1.7.20 <2.0' + ext.kotlin_version = '1.8.0' repositories { mavenCentral() google() diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8963775e..ca42bf8d 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -2,7 +2,7 @@ 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" + //id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() @@ -41,7 +41,7 @@ android { } kotlinOptions { - jvmTarget = '>=1.7.20 <2.0' // Ensure this is set to 1.8 to match Java compatibility + jvmTarget = '1.8.0' // Ensure this is set to 1.8 to match Java compatibility } buildTypes { diff --git a/example/android/build.gradle b/example/android/build.gradle index 7a383f61..76f618e9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '>=1.7.20 <2.0' + ext.kotlin_version = '1.8.0' repositories { google() jcenter()