Skip to content

Commit

Permalink
Merge pull request #3 from PauloniaAQP/remote_conf_update
Browse files Browse the repository at this point in the history
Remote conf update to Flutter 3.13
  • Loading branch information
ChrisChV authored Sep 21, 2023
2 parents 762aa09 + c334b6e commit 7006a52
Show file tree
Hide file tree
Showing 17 changed files with 481 additions and 353 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.4.0]

- Dependencies updated to Flutter 3.13.

## [0.3.0]

- Dependencies updated
Expand Down
6 changes: 5 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols
Expand All @@ -44,3 +43,8 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

/lib/firebase_options.dart
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
ios/firebase_app_id_file.json
7 changes: 3 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 30
compileSdkVersion 33

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

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 30
minSdkVersion 19
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
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.3.50'
ext.kotlin_version = '1.8.21'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
}
Expand All @@ -27,6 +27,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-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
25 changes: 13 additions & 12 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:paulonia_remote_conf/constants.dart';
import 'package:paulonia_remote_conf/paulonia_remote_conf.dart';
import 'firebase_options.dart';


void main() async{
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await PauloniaRemoteConf.init({
"Test": 5,
"Test 2": "Test"
});
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await PauloniaRemoteConf.init({"Test": 5, "Test_2": "Test"});
runApp(MyApp());
}

Expand All @@ -28,7 +27,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
MyHomePage({Key? key, this.title = ""}) : super(key: key);

final String title;

Expand All @@ -37,7 +36,6 @@ class MyHomePage extends StatefulWidget {
}

class _MyHomePageState extends State<MyHomePage> {

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -49,13 +47,16 @@ class _MyHomePageState extends State<MyHomePage> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'This is a test value: ' + PauloniaRemoteConf.get("Test", PRCType.INT).toString(),
'This is a test value: ' +
PauloniaRemoteConf.get("Test", PRCType.INT).toString(),
),
Text(
"This is other test: " + PauloniaRemoteConf.get("Test 2", PRCType.STRING).toString(),
"This is other test: " +
PauloniaRemoteConf.get("Test_2", PRCType.STRING).toString(),
),
Text(
'This is an other test value: ' + PauloniaRemoteConf.getValue("Test").asString(),
'This is an other test value: ' +
PauloniaRemoteConf.getValue("Test").asString(),
),
],
),
Expand Down
Loading

0 comments on commit 7006a52

Please sign in to comment.