Skip to content

Commit 7b56364

Browse files
committed
FLUT-7109-[bug][flutter]: Done the sample runnable
1 parent 0e162d2 commit 7b56364

File tree

84 files changed

+2850
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2850
-326
lines changed

.gitignore

-78
This file was deleted.

analysis_options.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

+16-10
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,33 @@ if (flutterVersionName == null) {
2222
}
2323

2424
apply plugin: 'com.android.application'
25-
apply plugin: 'com.google.gms.google-services'
2625
apply plugin: 'kotlin-android'
2726
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2827

2928
android {
30-
compileSdkVersion 28
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3131

32-
sourceSets {
33-
main.java.srcDirs += 'src/main/kotlin'
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = '1.8'
3439
}
3540

36-
lintOptions {
37-
disable 'InvalidPackage'
41+
sourceSets {
42+
main.java.srcDirs += 'src/main/kotlin'
3843
}
3944

4045
defaultConfig {
4146
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42-
applicationId "com.example.firebase_chartdata"
43-
minSdkVersion 16
44-
targetSdkVersion 28
47+
applicationId "com.example.render_chart_with_firebase_json_data_flutter_charts"
48+
// You can update the following values to match your application needs.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50+
minSdkVersion flutter.minSdkVersion
51+
targetSdkVersion flutter.targetSdkVersion
4552
versionCode flutterVersionCode.toInteger()
4653
versionName flutterVersionName
4754
}
@@ -61,5 +68,4 @@ flutter {
6168

6269
dependencies {
6370
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64-
implementation 'com.google.firebase:firebase-analytics:17.2.2'
6571
}

android/app/google-services.json

-40
This file was deleted.

android/app/src/debug/AndroidManifest.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.firebase_chartdata">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.example.render_chart_with_firebase_json_data_flutter_charts">
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>

android/app/src/main/AndroidManifest.xml

+5-18
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.firebase_chartdata">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
8-
<application
9-
android:name="io.flutter.app.FlutterApplication"
10-
android:label="firebase_chartdata"
2+
package="com.example.render_chart_with_firebase_json_data_flutter_charts">
3+
<application
4+
android:label="render_chart_with_firebase_json_data_flutter_charts"
5+
android:name="${applicationName}"
116
android:icon="@mipmap/ic_launcher">
127
<activity
138
android:name=".MainActivity"
9+
android:exported="true"
1410
android:launchMode="singleTop"
1511
android:theme="@style/LaunchTheme"
1612
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@@ -24,15 +20,6 @@
2420
android:name="io.flutter.embedding.android.NormalTheme"
2521
android:resource="@style/NormalTheme"
2622
/>
27-
<!-- Displays an Android View that continues showing the launch screen
28-
Drawable until Flutter paints its first frame, then this splash
29-
screen fades out. A splash screen is useful to avoid any visual
30-
gap between the end of Android's launch screen and the painting of
31-
Flutter's first frame. -->
32-
<meta-data
33-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
34-
android:resource="@drawable/launch_background"
35-
/>
3623
<intent-filter>
3724
<action android:name="android.intent.action.MAIN"/>
3825
<category android:name="android.intent.category.LAUNCHER"/>

android/app/src/main/kotlin/com/example/firebase_chartdata/MainActivity.kt

-6
This file was deleted.

android/app/src/main/kotlin/com/example/jsonsample/MainActivity.kt

-6
This file was deleted.
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<!-- Theme applied to the Android Window while the process is starting -->
4-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15-
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16-
<item name="android:windowBackground">@android:color/white</item>
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
1717
</style>
1818
</resources>

android/app/src/profile/AndroidManifest.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.firebase_chartdata">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.example.render_chart_with_firebase_json_data_flutter_charts">
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>

android/build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
10-
classpath 'com.google.gms:google-services:4.3.3'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1110
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1211
}
1312
}
1413

1514
allprojects {
1615
repositories {
1716
google()
18-
jcenter()
17+
mavenCentral()
1918
}
2019
}
2120

android/firebase_chartdata_android.iml

-29
This file was deleted.

android/gradle.properties

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

0 commit comments

Comments
 (0)