Skip to content
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

Updated TextTheme #199

Open
wants to merge 11 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
13 changes: 11 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group 'co.paystack.flutterpaystack'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.20'
ext.kotlin_version = '1.8.0'
repositories {
mavenCentral()
google()
Expand All @@ -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'
}
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
54 changes: 32 additions & 22 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,47 +1,57 @@
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"

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}
android {
compileSdkVersion 32
applicationId "co.paystack.flutterpaystack"
compileSdk = 34
ndkVersion = flutter.ndkVersion

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

lintOptions {
disable 'InvalidPackage'
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "co.paystack.flutterpaystack"
minSdkVersion 16
targetSdkVersion 32
versionCode 1
versionName "1.0"
minSdk = 16
targetSdk = 34
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

kotlinOptions {
jvmTarget = '1.8.0' // Ensure this is set to 1.8 to match Java compatibility
}

buildTypes {
release {
signingConfig signingConfigs.debug
signingConfig = signingConfigs.debug
}
}
}


flutter {
source '../..'
}
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.0'
repositories {
google()
jcenter()
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().titleMedium?.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