Skip to content

Consolidated Namespace, Package and Text Theme Style Fix #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'co.paystack.flutterpaystack'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.20'
ext.kotlin_version = '1.9.20'
repositories {
mavenCentral()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.0-rc02'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,17 +25,29 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 32
namespace 'co.paystack.flutterpaystack'
compileSdkVersion 35

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
// coreLibraryDesugaringEnabled true // Enable desugaring
}

kotlinOptions {
jvmTarget = '21' // set java compatibility to 21
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
minSdkVersion 23
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
versionCode 21
versionName "3.0.10"
}

lintOptions {
disable 'InvalidPackage'
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.paystack.flutterpaystack">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
Expand Down
1 change: 1 addition & 0 deletions example/.fvm/flutter_sdk
4 changes: 4 additions & 0 deletions example/.fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutterSdkVersion": "3.27.4",
"flavors": {}
}
21 changes: 18 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 32
namespace 'co.paystack.flutterpaystackexample'
compileSdkVersion 35

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
// coreLibraryDesugaringEnabled true // Enable desugaring
}

kotlinOptions {
jvmTarget = '21'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -28,8 +39,8 @@ android {

defaultConfig {
applicationId "co.paystack.flutterpaystack"
minSdkVersion 16
targetSdkVersion 32
minSdkVersion 23
targetSdkVersion 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -44,4 +55,8 @@ android {

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
3 changes: 1 addition & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.paystack.flutterpaystackexample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<application
Expand Down
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.9.20'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class _HomePageState extends State<HomePage> {
primaryColorLight: Colors.white,
primaryColorDark: navyBlue,
textTheme: Theme.of(context).textTheme.copyWith(
bodyText2: TextStyle(
bodyMedium: TextStyle(
color: lightBlue,
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/birthday_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class _BirthdayWidgetState extends BaseState<BirthdayWidget> {
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w500,
color: context.textTheme().headline6?.color,
color: context.textTheme().titleLarge?.color,
fontSize: 15.0,
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/checkout/checkout_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class _CheckoutWidgetState extends BaseState<CheckoutWidget>
Text(
'Pay',
style: TextStyle(
fontSize: 14.0, color: context.textTheme().headline1?.color),
fontSize: 14.0, color: context.textTheme().displayLarge?.color),
),
SizedBox(
width: 5.0,
Expand All @@ -197,7 +197,7 @@ class _CheckoutWidgetState extends BaseState<CheckoutWidget>
child: Text(Utils.formatAmount(_charge.amount),
style: TextStyle(
fontSize: 15.0,
color: context.textTheme().headline6?.color,
color: context.textTheme().titleLarge?.color,
fontWeight: FontWeight.bold)))
],
)
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/custom_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
));
Expand All @@ -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,
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/otp_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _OtpWidgetState extends BaseState<OtpWidget> {
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w500,
color: context.textTheme().headline6?.color,
color: context.textTheme().titleLarge?.color,
fontSize: 15.0,
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/pin_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _PinWidgetState extends BaseState<PinWidget> {
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w500,
color: context.textTheme().headline6?.color,
color: context.textTheme().titleLarge?.color,
fontSize: 15.0,
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/sucessful_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _SuccessfulWidgetState extends State<SuccessfulWidget>
Text(
'Payment Successful',
style: TextStyle(
color: context.textTheme().headline6?.color,
color: context.textTheme().titleLarge?.color,
fontWeight: FontWeight.w500,
fontSize: 16.0,
),
Expand All @@ -98,7 +98,7 @@ class _SuccessfulWidgetState extends State<SuccessfulWidget>
? 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,
)),
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ homepage: https://github.com/wilburt/flutter_paystack
dependencies:
flutter:
sdk: flutter
http: ^0.13.5
intl: ^0.17.0
http: ^1.2.0
intl: ^0.19.0
meta: ^1.8.0
async: ^2.9.0

Expand All @@ -33,5 +33,5 @@ flutter:


environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.12.0 <4.0.0'
flutter: ">=2.0.0"