Skip to content

Commit f3c330c

Browse files
committed
Added flavor icons and names
1 parent 3c54638 commit f3c330c

Some content is hidden

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

54 files changed

+118
-14
lines changed

android/app/build.gradle

+19
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@ android {
4141
versionName flutterVersionName
4242
}
4343

44+
flavorDimensions "app"
45+
46+
productFlavors {
47+
48+
cookie {
49+
dimension "app"
50+
applicationId "dev.flutterexplained.flavour_example.cookie"
51+
versionCode 1
52+
versionName "1.0"
53+
}
54+
55+
coffee {
56+
dimension "app"
57+
applicationId "dev.flutterexplained.flavour_example.coffee"
58+
versionCode 1
59+
versionName "1.0"
60+
}
61+
}
62+
4463
buildTypes {
4564
release {
4665
// TODO: Add your own signing config for the release build.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">Beans Factory</string>
4+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">Munchy Crunchy</string>
4+
</resources>

android/app/src/main/AndroidManifest.xml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="dev.flutterexplained.flavour_example">
3-
<application
4-
android:label="flavour_example"
5-
android:icon="@mipmap/ic_launcher">
3+
4+
<application
5+
android:icon="@mipmap/ic_launcher"
6+
android:label="@string/app_name">
67
<activity
78
android:name=".MainActivity"
8-
android:launchMode="singleTop"
9-
android:theme="@style/LaunchTheme"
109
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1110
android:hardwareAccelerated="true"
11+
android:launchMode="singleTop"
12+
android:theme="@style/LaunchTheme"
1213
android:windowSoftInputMode="adjustResize">
1314
<!-- Specifies an Android theme to apply to this Activity as soon as
1415
the Android process has started. This theme is visible to the user
1516
while the Flutter UI initializes. After that, this theme continues
1617
to determine the Window background behind the Flutter UI. -->
1718
<meta-data
18-
android:name="io.flutter.embedding.android.NormalTheme"
19-
android:resource="@style/NormalTheme"
20-
/>
19+
android:name="io.flutter.embedding.android.NormalTheme"
20+
android:resource="@style/NormalTheme" />
2121
<!-- Displays an Android View that continues showing the launch screen
2222
Drawable until Flutter paints its first frame, then this splash
2323
screen fades out. A splash screen is useful to avoid any visual
2424
gap between the end of Android's launch screen and the painting of
2525
Flutter's first frame. -->
2626
<meta-data
27-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28-
android:resource="@drawable/launch_background"
29-
/>
27+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28+
android:resource="@drawable/launch_background" />
3029
<intent-filter>
31-
<action android:name="android.intent.action.MAIN"/>
32-
<category android:name="android.intent.category.LAUNCHER"/>
30+
<action android:name="android.intent.action.MAIN" />
31+
<category android:name="android.intent.category.LAUNCHER" />
3332
</intent-filter>
3433
</activity>
3534
<!-- Don't delete the meta-data below.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">Default App Name</string>
4+
</resources>

assets/app_icons/app_icon_coffee.jpg

765 KB

assets/app_icons/app_icon_cookie.jpg

1.19 MB

flutter_launcher_icons-coffee.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flutter_icons:
2+
android: true
3+
ios: true
4+
image_path: "assets/app_icons/app_icon_coffee.jpg"

flutter_launcher_icons-cookie.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flutter_icons:
2+
android: true
3+
ios: true
4+
image_path: "assets/app_icons/app_icon_cookie.jpg"

ios/Runner.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -959,4 +959,4 @@
959959
/* End XCConfigurationList section */
960960
};
961961
rootObject = 97C146E61CF9000F007C117D /* Project object */;
962-
}
962+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"images":[{"size":"20x20","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"60x60","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"[email protected]","scale":"1x"}],"info":{"version":1,"author":"xcode"}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"images":[{"size":"20x20","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"60x60","idiom":"iphone","filename":"[email protected]","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"[email protected]","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"[email protected]","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"[email protected]","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"[email protected]","scale":"1x"}],"info":{"version":1,"author":"xcode"}}

pubspec.lock

+63
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# Generated by pub
22
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
4+
archive:
5+
dependency: transitive
6+
description:
7+
name: archive
8+
url: "https://pub.dartlang.org"
9+
source: hosted
10+
version: "2.0.13"
11+
args:
12+
dependency: transitive
13+
description:
14+
name: args
15+
url: "https://pub.dartlang.org"
16+
source: hosted
17+
version: "1.6.0"
418
async:
519
dependency: transitive
620
description:
@@ -43,6 +57,20 @@ packages:
4357
url: "https://pub.dartlang.org"
4458
source: hosted
4559
version: "1.15.0"
60+
convert:
61+
dependency: transitive
62+
description:
63+
name: convert
64+
url: "https://pub.dartlang.org"
65+
source: hosted
66+
version: "2.1.1"
67+
crypto:
68+
dependency: transitive
69+
description:
70+
name: crypto
71+
url: "https://pub.dartlang.org"
72+
source: hosted
73+
version: "2.1.5"
4674
cupertino_icons:
4775
dependency: "direct main"
4876
description:
@@ -62,6 +90,13 @@ packages:
6290
description: flutter
6391
source: sdk
6492
version: "0.0.0"
93+
flutter_launcher_icons:
94+
dependency: "direct dev"
95+
description:
96+
name: flutter_launcher_icons
97+
url: "https://pub.dartlang.org"
98+
source: hosted
99+
version: "0.8.1"
65100
flutter_riverpod:
66101
dependency: "direct main"
67102
description:
@@ -81,6 +116,13 @@ packages:
81116
url: "https://pub.dartlang.org"
82117
source: hosted
83118
version: "0.14.1"
119+
image:
120+
dependency: transitive
121+
description:
122+
name: image
123+
url: "https://pub.dartlang.org"
124+
source: hosted
125+
version: "2.1.19"
84126
json_annotation:
85127
dependency: transitive
86128
description:
@@ -109,6 +151,13 @@ packages:
109151
url: "https://pub.dartlang.org"
110152
source: hosted
111153
version: "1.8.0"
154+
petitparser:
155+
dependency: transitive
156+
description:
157+
name: petitparser
158+
url: "https://pub.dartlang.org"
159+
source: hosted
160+
version: "3.1.0"
112161
riverpod:
113162
dependency: transitive
114163
description:
@@ -184,6 +233,20 @@ packages:
184233
url: "https://pub.dartlang.org"
185234
source: hosted
186235
version: "2.1.0"
236+
xml:
237+
dependency: transitive
238+
description:
239+
name: xml
240+
url: "https://pub.dartlang.org"
241+
source: hosted
242+
version: "4.5.1"
243+
yaml:
244+
dependency: transitive
245+
description:
246+
name: yaml
247+
url: "https://pub.dartlang.org"
248+
source: hosted
249+
version: "2.2.1"
187250
sdks:
188251
dart: ">=2.12.0 <3.0.0"
189252
flutter: ">=1.17.0"

pubspec.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ dependencies:
3333
dev_dependencies:
3434
flutter_test:
3535
sdk: flutter
36+
flutter_launcher_icons: ^0.8.1
3637

3738
# For information on the generic Dart part of this file, see the
3839
# following page: https://dart.dev/tools/pub/pubspec

0 commit comments

Comments
 (0)