Browse Source

add phone launch splash

pull/18/head
Sun 4 years ago
parent
commit
45d4a60e01
  1. BIN
      android/app/src/main/res/drawable-v21/background.png
  2. 14
      android/app/src/main/res/drawable-v21/launch_background.xml
  3. BIN
      android/app/src/main/res/drawable/background.png
  4. 14
      android/app/src/main/res/drawable/launch_background.xml
  5. 3
      android/app/src/main/res/values-night/styles.xml
  6. 3
      android/app/src/main/res/values/styles.xml
  7. BIN
      assets/images/background.png
  8. 2
      ios/Runner.xcodeproj/project.pbxproj
  9. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  10. 21
      ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
  11. BIN
      ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
  12. 10
      ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  13. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  14. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  15. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  16. 17
      ios/Runner/Base.lproj/LaunchScreen.storyboard
  17. 106
      ios/Runner/Info.plist
  18. 77
      pubspec.lock
  19. 7
      pubspec.yaml

BIN
android/app/src/main/res/drawable-v21/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

14
android/app/src/main/res/drawable-v21/launch_background.xml

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
</layer-list>

BIN
android/app/src/main/res/drawable/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

14
android/app/src/main/res/drawable/launch_background.xml

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
</layer-list>

3
android/app/src/main/res/values-night/styles.xml

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowFullscreen">false</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
@ -15,4 +16,4 @@ @@ -15,4 +16,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>

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

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowFullscreen">false</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
@ -15,4 +16,4 @@ @@ -15,4 +16,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>

BIN
assets/images/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

2
ios/Runner.xcodeproj/project.pbxproj

@ -554,4 +554,4 @@ @@ -554,4 +554,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 103 KiB

21
ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json vendored

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "background.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

10
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json vendored

@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

17
ios/Runner/Base.lproj/LaunchScreen.storyboard

@ -16,13 +16,19 @@ @@ -16,13 +16,19 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
</constraints>
</view>
</viewController>
@ -33,5 +39,6 @@ @@ -33,5 +39,6 @@
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>
</document>

106
ios/Runner/Info.plist

@ -1,55 +1,57 @@ @@ -1,55 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>ESSE</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>esse</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSPhotoLibraryAddUsageDescription></key>
<string>Used to save image to photos</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>ESSE</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>esse</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSPhotoLibraryAddUsageDescription></key>
<string>Used to save image to photos</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<false/>
</dict>
</plist>

77
pubspec.lock

@ -14,7 +14,7 @@ packages: @@ -14,7 +14,7 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
version: "2.3.0"
async:
dependency: transitive
description:
@ -28,7 +28,7 @@ packages: @@ -28,7 +28,7 @@ packages:
name: audio_session
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.6"
version: "0.1.6+1"
boolean_selector:
dependency: transitive
description:
@ -98,7 +98,7 @@ packages: @@ -98,7 +98,7 @@ packages:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1+4"
version: "0.3.1+5"
crypto:
dependency: "direct main"
description:
@ -112,7 +112,7 @@ packages: @@ -112,7 +112,7 @@ packages:
name: device_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "3.0.1"
device_info_plus_linux:
dependency: transitive
description:
@ -182,20 +182,20 @@ packages: @@ -182,20 +182,20 @@ packages:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
version: "4.1.3"
file_selector:
dependency: "direct main"
description:
name: file_selector
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.2"
version: "0.8.2+1"
file_selector_linux:
dependency: "direct main"
description:
path: "plugins/file_selector/file_selector_linux"
ref: HEAD
resolved-ref: "1d9232e2c172992b74ba538851ffea26a0cb2640"
resolved-ref: "03d957e8b5c99fc83cd4a781031b154ab3de8753"
url: "git://github.com/google/flutter-desktop-embedding.git"
source: git
version: "0.0.2+1"
@ -204,7 +204,7 @@ packages: @@ -204,7 +204,7 @@ packages:
description:
path: "plugins/file_selector/file_selector_macos"
ref: HEAD
resolved-ref: "1d9232e2c172992b74ba538851ffea26a0cb2640"
resolved-ref: "03d957e8b5c99fc83cd4a781031b154ab3de8753"
url: "git://github.com/google/flutter-desktop-embedding.git"
source: git
version: "0.0.4+1"
@ -227,7 +227,7 @@ packages: @@ -227,7 +227,7 @@ packages:
description:
path: "plugins/file_selector/file_selector_windows"
ref: HEAD
resolved-ref: "1d9232e2c172992b74ba538851ffea26a0cb2640"
resolved-ref: "03d957e8b5c99fc83cd4a781031b154ab3de8753"
url: "git://github.com/google/flutter-desktop-embedding.git"
source: git
version: "0.0.2+1"
@ -267,6 +267,13 @@ packages: @@ -267,6 +267,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
flutter_native_splash:
dependency: "direct dev"
description:
name: flutter_native_splash
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.4"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@ -295,7 +302,7 @@ packages: @@ -295,7 +302,7 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.3"
version: "0.13.4"
http_parser:
dependency: transitive
description:
@ -309,14 +316,14 @@ packages: @@ -309,14 +316,14 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
version: "3.0.8"
image_picker:
dependency: "direct main"
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4"
version: "0.8.4+2"
image_picker_for_web:
dependency: transitive
description:
@ -330,7 +337,7 @@ packages: @@ -330,7 +337,7 @@ packages:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.1"
image_save:
dependency: "direct main"
description:
@ -363,7 +370,7 @@ packages: @@ -363,7 +370,7 @@ packages:
name: just_audio
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.10"
version: "0.9.12"
just_audio_platform_interface:
dependency: transitive
description:
@ -426,14 +433,14 @@ packages: @@ -426,14 +433,14 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.5"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.1.0"
path_provider_macos:
dependency: transitive
description:
@ -455,20 +462,13 @@ packages: @@ -455,20 +462,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
percent_indicator:
dependency: "direct main"
description:
name: percent_indicator
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.4.0"
permission_handler:
dependency: "direct main"
description:
@ -482,14 +482,14 @@ packages: @@ -482,14 +482,14 @@ packages:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
version: "3.7.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
version: "4.3.0"
platform:
dependency: transitive
description:
@ -503,7 +503,7 @@ packages: @@ -503,7 +503,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
process:
dependency: transitive
description:
@ -517,7 +517,7 @@ packages: @@ -517,7 +517,7 @@ packages:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.0"
version: "6.0.1"
qr:
dependency: transitive
description:
@ -573,7 +573,7 @@ packages: @@ -573,7 +573,7 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7"
version: "2.0.8"
shared_preferences_linux:
dependency: transitive
description:
@ -670,6 +670,13 @@ packages: @@ -670,6 +670,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
universal_io:
dependency: transitive
description:
name: universal_io
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
unorm_dart:
dependency: "direct main"
description:
@ -683,7 +690,7 @@ packages: @@ -683,7 +690,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.10"
version: "6.0.12"
url_launcher_linux:
dependency: transitive
description:
@ -725,7 +732,7 @@ packages: @@ -725,7 +732,7 @@ packages:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
version: "3.0.5"
vector_math:
dependency: transitive
description:
@ -760,7 +767,7 @@ packages: @@ -760,7 +767,7 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.8"
version: "2.2.9"
xdg_directories:
dependency: transitive
description:
@ -774,7 +781,7 @@ packages: @@ -774,7 +781,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
version: "5.3.0"
yaml:
dependency: transitive
description:
@ -783,5 +790,5 @@ packages: @@ -783,5 +790,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.13.0 <3.0.0"
flutter: ">=2.0.2"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

7
pubspec.yaml

@ -21,7 +21,7 @@ dependencies: @@ -21,7 +21,7 @@ dependencies:
shared_preferences: any
path_provider: any
url_launcher: any
permission_handler: any
permission_handler: 8.1.4+2
image_picker: any # pick image
image_save: any # Mobile save image to gallery
file_picker: any # pick file
@ -60,12 +60,17 @@ dev_dependencies: @@ -60,12 +60,17 @@ dev_dependencies:
integration_test:
sdk: flutter
flutter_launcher_icons: any #flutter pub run flutter_launcher_icons:main
flutter_native_splash: any #flutter pub run flutter_native_splash:create
flutter_icons:
android: "ic_launcher"
ios: true
image_path: "assets/logo/logo_dark.png"
flutter_native_splash:
background_image: "assets/images/background.png"
#android12: true
flutter:
uses-material-design: true
assets:

Loading…
Cancel
Save