Skip to content

Commit e144e77

Browse files
authored
update deps and refactor (#5)
* update deps and refactor * flutter format * update theme data * run on macos desktop
1 parent 29e3fb9 commit e144e77

File tree

93 files changed

+3313
-443
lines changed

Some content is hidden

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

93 files changed

+3313
-443
lines changed

.metadata

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled and should not be manually edited.
4+
# This file should be version controlled.
55

66
version:
7-
revision: d9637ed78468ee0e65af509fafb71f792de6d09a
8-
channel: master
7+
revision: cd41fdd495f6944ecd3506c21e94c6567b073278
8+
channel: stable
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
17+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
18+
- platform: android
19+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
20+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
21+
- platform: ios
22+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
23+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
24+
- platform: linux
25+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
26+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
27+
- platform: macos
28+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
29+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
30+
- platform: web
31+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
32+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
33+
- platform: windows
34+
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
35+
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

android/.gitignore

Lines changed: 2 additions & 0 deletions
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

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,29 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 29
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3031

31-
sourceSets {
32-
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'
3339
}
3440

35-
lintOptions {
36-
disable 'InvalidPackage'
41+
sourceSets {
42+
main.java.srcDirs += 'src/main/kotlin'
3743
}
3844

3945
defaultConfig {
4046
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.hoc.githubsearch.flutter_github_search_rx_redux"
42-
minSdkVersion 16
43-
targetSdkVersion 29
47+
applicationId "com.hoc081098.flutter_github_search_rx_redux"
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
4452
versionCode flutterVersionCode.toInteger()
4553
versionName flutterVersionName
4654
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
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.hoc.githubsearch.flutter_github_search_rx_redux">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.hoc081098.flutter_github_search_rx_redux">
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"/>
Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,28 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.hoc.githubsearch.flutter_github_search_rx_redux">
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. -->
2+
package="com.hoc081098.flutter_github_search_rx_redux">
3+
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
86
<application
9-
android:name="io.flutter.app.FlutterApplication"
10-
android:label="flutter_github_search_rx_redux"
11-
android:icon="@mipmap/ic_launcher">
7+
android:label="flutter_github_search_rx_redux"
8+
android:name="${applicationName}"
9+
android:icon="@mipmap/ic_launcher">
1210
<activity
13-
android:name=".MainActivity"
14-
android:launchMode="singleTop"
15-
android:theme="@style/LaunchTheme"
16-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
17-
android:hardwareAccelerated="true"
18-
android:windowSoftInputMode="adjustResize">
11+
android:name=".MainActivity"
12+
android:exported="true"
13+
android:launchMode="singleTop"
14+
android:theme="@style/LaunchTheme"
15+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
16+
android:hardwareAccelerated="true"
17+
android:windowSoftInputMode="adjustResize">
1918
<!-- Specifies an Android theme to apply to this Activity as soon as
2019
the Android process has started. This theme is visible to the user
2120
while the Flutter UI initializes. After that, this theme continues
2221
to determine the Window background behind the Flutter UI. -->
2322
<meta-data
24-
android:name="io.flutter.embedding.android.NormalTheme"
25-
android:resource="@style/NormalTheme"
26-
/>
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-
/>
23+
android:name="io.flutter.embedding.android.NormalTheme"
24+
android:resource="@style/NormalTheme"
25+
/>
3626
<intent-filter>
3727
<action android:name="android.intent.action.MAIN"/>
3828
<category android:name="android.intent.category.LAUNCHER"/>
@@ -41,7 +31,7 @@
4131
<!-- Don't delete the meta-data below.
4232
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
4333
<meta-data
44-
android:name="flutterEmbedding"
45-
android:value="2" />
34+
android:name="flutterEmbedding"
35+
android:value="2"/>
4636
</application>
4737
</manifest>

android/app/src/main/kotlin/com/hoc/githubsearch/flutter_github_search_rx_redux/MainActivity.kt renamed to android/app/src/main/kotlin/com/hoc081098/flutter_github_search_rx_redux/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.hoc.githubsearch.flutter_github_search_rx_redux
1+
package com.hoc081098.flutter_github_search_rx_redux
22

33
import io.flutter.embedding.android.FlutterActivity
44

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
the Flutter engine draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
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:colorBackground</item>
17+
</style>
18+
</resources>
Lines changed: 6 additions & 6 deletions
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

Lines changed: 3 additions & 2 deletions
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.hoc.githubsearch.flutter_github_search_rx_redux">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.hoc081098.flutter_github_search_rx_redux">
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"/>

0 commit comments

Comments
 (0)