Skip to content

Commit e718276

Browse files
Migrated Project to use flutterEmbedding 2
1 parent e01b680 commit e718276

File tree

8 files changed

+62
-63
lines changed

8 files changed

+62
-63
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
*.ipr
1515
*.iws
1616
.idea/
17+
example/.idea/
1718

1819
# The .vscode folder contains launch configuration and tasks you configure in
1920
# VS Code which you may wish to be included in version control, so this line
2021
# is commented out by default.
21-
#.vscode/
22+
.vscode/
23+
example/.vscode/
2224

2325
# Flutter/Dart/Pub related
2426
**/doc/api/

example/.vscode/settings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

example/android/app/src/main/AndroidManifest.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
additional functionality it is fine to subclass or reimplement
88
FlutterApplication and put your custom class here. -->
99
<application
10-
android:name="io.flutter.app.FlutterApplication"
1110
android:label="example"
1211
android:icon="@mipmap/ic_launcher">
1312
<activity
@@ -17,17 +16,26 @@
1716
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1817
android:hardwareAccelerated="true"
1918
android:windowSoftInputMode="adjustResize">
20-
<!-- This keeps the window background of the activity showing
21-
until Flutter renders its first frame. It can be removed if
22-
there is no splash screen (such as the default splash screen
23-
defined in @style/LaunchTheme). -->
19+
<!-- Specify that the launch screen should continue being displayed -->
20+
<!-- until Flutter renders its first frame. -->
2421
<meta-data
25-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26-
android:value="true" />
22+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
23+
android:resource="@drawable/launch_background" />
24+
25+
<!-- Theme to apply as soon as Flutter begins rendering frames -->
26+
<meta-data
27+
android:name="io.flutter.embedding.android.NormalTheme"
28+
android:resource="@style/NormalTheme"
29+
/>
2730
<intent-filter>
2831
<action android:name="android.intent.action.MAIN"/>
2932
<category android:name="android.intent.category.LAUNCHER"/>
3033
</intent-filter>
3134
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
37+
<meta-data
38+
android:name="flutterEmbedding"
39+
android:value="2" />
3240
</application>
3341
</manifest>
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
package com.example.example;
22

3-
import android.os.Bundle;
4-
import io.flutter.app.FlutterActivity;
5-
import io.flutter.plugins.GeneratedPluginRegistrant;
3+
import io.flutter.embedding.android.FlutterActivity;
64

75
public class MainActivity extends FlutterActivity {
8-
@Override
9-
protected void onCreate(Bundle savedInstanceState) {
10-
super.onCreate(savedInstanceState);
11-
GeneratedPluginRegistrant.registerWith(this);
12-
}
136
}

example/android/app/src/main/res/values/styles.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
Flutter draws its first frame -->
66
<item name="android:windowBackground">@drawable/launch_background</item>
77
</style>
8+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
9+
<item name="android:windowBackground">@android:color/white</item>
10+
</style>
811
</resources>

example/pubspec.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.4.2"
10+
version: "2.5.0-nullsafety.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.0.0"
17+
version: "2.1.0-nullsafety.1"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.0.0"
24+
version: "1.1.0-nullsafety.3"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.1.3"
31+
version: "1.2.0-nullsafety.1"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.0.1"
38+
version: "1.1.0-nullsafety.1"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.14.13"
45+
version: "1.15.0-nullsafety.3"
4646
cupertino_icons:
4747
dependency: "direct main"
4848
description:
@@ -56,14 +56,14 @@ packages:
5656
path: ".."
5757
relative: true
5858
source: path
59-
version: "1.2.0"
59+
version: "1.2.1"
6060
fake_async:
6161
dependency: transitive
6262
description:
6363
name: fake_async
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "1.1.0"
66+
version: "1.2.0-nullsafety.1"
6767
flutter:
6868
dependency: "direct main"
6969
description: flutter
@@ -87,21 +87,21 @@ packages:
8787
name: matcher
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "0.12.8"
90+
version: "0.12.10-nullsafety.1"
9191
meta:
9292
dependency: transitive
9393
description:
9494
name: meta
9595
url: "https://pub.dartlang.org"
9696
source: hosted
97-
version: "1.1.8"
97+
version: "1.3.0-nullsafety.3"
9898
path:
9999
dependency: transitive
100100
description:
101101
name: path
102102
url: "https://pub.dartlang.org"
103103
source: hosted
104-
version: "1.7.0"
104+
version: "1.8.0-nullsafety.1"
105105
sky_engine:
106106
dependency: transitive
107107
description: flutter
@@ -113,55 +113,55 @@ packages:
113113
name: source_span
114114
url: "https://pub.dartlang.org"
115115
source: hosted
116-
version: "1.7.0"
116+
version: "1.8.0-nullsafety.2"
117117
stack_trace:
118118
dependency: transitive
119119
description:
120120
name: stack_trace
121121
url: "https://pub.dartlang.org"
122122
source: hosted
123-
version: "1.9.5"
123+
version: "1.10.0-nullsafety.1"
124124
stream_channel:
125125
dependency: transitive
126126
description:
127127
name: stream_channel
128128
url: "https://pub.dartlang.org"
129129
source: hosted
130-
version: "2.0.0"
130+
version: "2.1.0-nullsafety.1"
131131
string_scanner:
132132
dependency: transitive
133133
description:
134134
name: string_scanner
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137-
version: "1.0.5"
137+
version: "1.1.0-nullsafety.1"
138138
term_glyph:
139139
dependency: transitive
140140
description:
141141
name: term_glyph
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "1.1.0"
144+
version: "1.2.0-nullsafety.1"
145145
test_api:
146146
dependency: transitive
147147
description:
148148
name: test_api
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "0.2.17"
151+
version: "0.2.19-nullsafety.2"
152152
typed_data:
153153
dependency: transitive
154154
description:
155155
name: typed_data
156156
url: "https://pub.dartlang.org"
157157
source: hosted
158-
version: "1.2.0"
158+
version: "1.3.0-nullsafety.3"
159159
vector_math:
160160
dependency: transitive
161161
description:
162162
name: vector_math
163163
url: "https://pub.dartlang.org"
164164
source: hosted
165-
version: "2.0.8"
165+
version: "2.1.0-nullsafety.3"
166166
sdks:
167-
dart: ">=2.9.0-14.0.dev <3.0.0"
167+
dart: ">=2.10.0-110 <2.11.0"

pubspec.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,49 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.4.2"
10+
version: "2.5.0-nullsafety.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.0.0"
17+
version: "2.1.0-nullsafety.1"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.0.0"
24+
version: "1.1.0-nullsafety.3"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.1.3"
31+
version: "1.2.0-nullsafety.1"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.0.1"
38+
version: "1.1.0-nullsafety.1"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.14.13"
45+
version: "1.15.0-nullsafety.3"
4646
fake_async:
4747
dependency: transitive
4848
description:
4949
name: fake_async
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.1.0"
52+
version: "1.2.0-nullsafety.1"
5353
flutter:
5454
dependency: "direct main"
5555
description: flutter
@@ -73,21 +73,21 @@ packages:
7373
name: matcher
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "0.12.8"
76+
version: "0.12.10-nullsafety.1"
7777
meta:
7878
dependency: transitive
7979
description:
8080
name: meta
8181
url: "https://pub.dartlang.org"
8282
source: hosted
83-
version: "1.1.8"
83+
version: "1.3.0-nullsafety.3"
8484
path:
8585
dependency: transitive
8686
description:
8787
name: path
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "1.7.0"
90+
version: "1.8.0-nullsafety.1"
9191
sky_engine:
9292
dependency: transitive
9393
description: flutter
@@ -99,55 +99,55 @@ packages:
9999
name: source_span
100100
url: "https://pub.dartlang.org"
101101
source: hosted
102-
version: "1.7.0"
102+
version: "1.8.0-nullsafety.2"
103103
stack_trace:
104104
dependency: transitive
105105
description:
106106
name: stack_trace
107107
url: "https://pub.dartlang.org"
108108
source: hosted
109-
version: "1.9.5"
109+
version: "1.10.0-nullsafety.1"
110110
stream_channel:
111111
dependency: transitive
112112
description:
113113
name: stream_channel
114114
url: "https://pub.dartlang.org"
115115
source: hosted
116-
version: "2.0.0"
116+
version: "2.1.0-nullsafety.1"
117117
string_scanner:
118118
dependency: transitive
119119
description:
120120
name: string_scanner
121121
url: "https://pub.dartlang.org"
122122
source: hosted
123-
version: "1.0.5"
123+
version: "1.1.0-nullsafety.1"
124124
term_glyph:
125125
dependency: transitive
126126
description:
127127
name: term_glyph
128128
url: "https://pub.dartlang.org"
129129
source: hosted
130-
version: "1.1.0"
130+
version: "1.2.0-nullsafety.1"
131131
test_api:
132132
dependency: transitive
133133
description:
134134
name: test_api
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137-
version: "0.2.17"
137+
version: "0.2.19-nullsafety.2"
138138
typed_data:
139139
dependency: transitive
140140
description:
141141
name: typed_data
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "1.2.0"
144+
version: "1.3.0-nullsafety.3"
145145
vector_math:
146146
dependency: transitive
147147
description:
148148
name: vector_math
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "2.0.8"
151+
version: "2.1.0-nullsafety.3"
152152
sdks:
153-
dart: ">=2.9.0-14.0.dev <3.0.0"
153+
dart: ">=2.10.0-110 <2.11.0"

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
intl: ^0.16.0
12+
intl: ^0.16.1
1313

1414
dev_dependencies:
1515
flutter_test:

0 commit comments

Comments
 (0)