TF-3772 Animated splash iOS

This commit is contained in:
DatDang
2025-06-09 13:30:32 +07:00
committed by Dat H. Pham
parent 6d7376aa4b
commit bb8a0e3e95
19 changed files with 90 additions and 21 deletions
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -2,4 +2,5 @@ class AssetsPaths {
static const images = 'assets/images/'; static const images = 'assets/images/';
static const icons = 'assets/icons/'; static const icons = 'assets/icons/';
static const configurationImages = 'configurations/icons/'; static const configurationImages = 'configurations/icons/';
static const animations = 'assets/animations/';
} }
@@ -231,11 +231,21 @@ class ImagePaths {
String get icDoubleArrowDown => _getImagePath('ic_double_arrow_down.svg'); String get icDoubleArrowDown => _getImagePath('ic_double_arrow_down.svg');
String get icRefreshQuotas => _getImagePath('ic_refresh_quotas.svg'); String get icRefreshQuotas => _getImagePath('ic_refresh_quotas.svg');
String get icCreateFilter => _getImagePath('ic_create_filter.svg'); String get icCreateFilter => _getImagePath('ic_create_filter.svg');
String get icTwakeWorkplace => _getIconPath('icon_twp.png');
String get animLottieTmail => _getAnimationPath('lottie-tmail.json');
String _getImagePath(String imageName) { String _getImagePath(String imageName) {
return AssetsPaths.images + imageName; return AssetsPaths.images + imageName;
} }
String _getIconPath(String iconName) {
return AssetsPaths.icons + iconName;
}
String _getAnimationPath(String animationName) {
return AssetsPaths.animations + animationName;
}
String getConfigurationImagePath(String imageName) { String getConfigurationImagePath(String imageName) {
return AssetsPaths.configurationImages + imageName; return AssetsPaths.configurationImages + imageName;
} }
+10
View File
@@ -160,6 +160,10 @@ PODS:
- libwebp/sharpyuv (1.5.0) - libwebp/sharpyuv (1.5.0)
- libwebp/webp (1.5.0): - libwebp/webp (1.5.0):
- libwebp/sharpyuv - libwebp/sharpyuv
- lottie-ios (4.3.4)
- lottie_native (0.0.1):
- Flutter
- lottie-ios (~> 4.3.4)
- Mantle (2.2.0): - Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0) - Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0) - Mantle/extobjc (2.2.0)
@@ -234,6 +238,7 @@ DEPENDENCIES:
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`) - flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`)
- lottie_native (from `.symlinks/plugins/lottie_native/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- patrol (from `.symlinks/plugins/patrol/darwin`) - patrol (from `.symlinks/plugins/patrol/darwin`)
@@ -262,6 +267,7 @@ SPEC REPOS:
- GoogleDataTransport - GoogleDataTransport
- GoogleUtilities - GoogleUtilities
- libwebp - libwebp
- lottie-ios
- Mantle - Mantle
- nanopb - nanopb
- OrderedSet - OrderedSet
@@ -316,6 +322,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_secure_storage/ios" :path: ".symlinks/plugins/flutter_secure_storage/ios"
flutter_web_auth_2: flutter_web_auth_2:
:path: ".symlinks/plugins/flutter_web_auth_2/ios" :path: ".symlinks/plugins/flutter_web_auth_2/ios"
lottie_native:
:path: ".symlinks/plugins/lottie_native/ios"
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
@@ -378,6 +386,8 @@ SPEC CHECKSUMS:
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
lottie-ios: 3d98679b41fa6fd6aff2352b3953dbd3df8a397e
lottie_native: e880defad595321983cebac72516c1a10b6df719
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

+24 -20
View File
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/> <device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
@@ -11,10 +12,6 @@
<scene sceneID="EHf-IW-A2E"> <scene sceneID="EHf-IW-A2E">
<objects> <objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> <viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -22,25 +19,32 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView> </imageView>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <rect key="frame" x="157.66666666666666" y="387" width="78" height="78"/>
<constraints>
<constraint firstAttribute="height" constant="78" id="Ch6-7E-p3P"/>
<constraint firstAttribute="width" constant="78" id="J0E-ji-GVw"/>
</constraints>
</imageView> </imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="BrandingImage" translatesAutoresizingMaskIntoConstraints="NO" id="Uyq-Kz-ftE"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="BrandingImage" translatesAutoresizingMaskIntoConstraints="NO" id="Uyq-Kz-ftE">
<rect key="frame" x="137.642932235324" y="747.00000000005798" width="114.99999999994452" height="45"/> <rect key="frame" x="91.666666666666686" y="746.66666666666663" width="210" height="31.333333333333371"/>
<constraints>
<constraint firstAttribute="height" constant="31.219999999999999" id="5i5-Om-Ipi"/>
<constraint firstAttribute="width" constant="210" id="xz3-s1-jBp"/>
</constraints>
</imageView> </imageView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="1jl-VA-0Qg"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/> <constraint firstItem="1jl-VA-0Qg" firstAttribute="bottom" secondItem="Uyq-Kz-ftE" secondAttribute="bottom" constant="40" id="8Yb-q4-8bl"/>
<constraint firstItem="Uyq-Kz-ftE" firstAttribute="centerX" secondItem="YRO-k0-Ey4" secondAttribute="centerX" id="3kg-TC-cPP"/>
<constraint firstAttribute="bottom" secondItem="Uyq-Kz-ftE" secondAttribute="bottom" constant="60" id="8Yb-q4-8bl"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/> <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 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 firstItem="1jl-VA-0Qg" 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="Uyq-Kz-ftE" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="dhO-ZW-bxS"/>
<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="1jl-VA-0Qg" secondAttribute="leading" id="kV7-tw-vXt"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/> <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="lYO-Of-7ta"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/> <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="xrp-QA-bQN"/>
</constraints> </constraints>
</view> </view>
</viewController> </viewController>
@@ -50,8 +54,8 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="BrandingImage" width="115" height="45"/> <image name="BrandingImage" width="178.66667175292969" height="26.666666030883789"/>
<image name="LaunchBackground" width="1" height="1"/> <image name="LaunchBackground" width="1" height="1"/>
<image name="LaunchImage" width="245" height="104"/> <image name="LaunchImage" width="58.333332061767578" height="58.333332061767578"/>
</resources> </resources>
</document> </document>
@@ -89,7 +89,8 @@ class HomeController extends ReloadableController {
static void downloadCallback(String id, DownloadTaskStatus status, int progress) {} static void downloadCallback(String id, DownloadTaskStatus status, int progress) {}
void _handleNavigateToScreen() { Future<void> _handleNavigateToScreen() async {
await Future.delayed(2.seconds);
final arguments = Get.arguments; final arguments = Get.arguments;
if (arguments is LoginNavigateArguments) { if (arguments is LoginNavigateArguments) {
_handleLoginNavigateArguments(arguments); _handleLoginNavigateArguments(arguments);
@@ -1,7 +1,10 @@
import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/utils/theme_utils.dart'; import 'package:core/presentation/utils/theme_utils.dart';
import 'package:core/utils/platform_info.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:lottie_native/lottie_native.dart';
import 'package:tmail_ui_user/features/home/presentation/home_controller.dart'; import 'package:tmail_ui_user/features/home/presentation/home_controller.dart';
class HomeView extends GetWidget<HomeController> { class HomeView extends GetWidget<HomeController> {
@@ -11,6 +14,34 @@ class HomeView extends GetWidget<HomeController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ThemeUtils.setSystemDarkUIStyle(); ThemeUtils.setSystemDarkUIStyle();
if (PlatformInfo.isIOS) {
return ColoredBox(
color: Colors.white,
child: Stack(
alignment: Alignment.center,
children: [
SizedBox(
width: 176,
height: 176,
child: LottieView.fromAsset(
filePath: controller.imagePaths.animLottieTmail,
loop: false,
),
),
Positioned(
bottom: 40,
child: SafeArea(
child: Image.asset(
controller.imagePaths.icTwakeWorkplace,
width: 210,
),
),
),
],
),
);
}
return Container( return Container(
color: AppColor.primaryLightColor, color: AppColor.primaryLightColor,
child: const SizedBox( child: const SizedBox(
+8
View File
@@ -1434,6 +1434,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
lottie_native:
dependency: "direct main"
description:
name: lottie_native
sha256: e834047f8172a0fe070eac6355d3c646b241b411619a26c914f0d804909b51a1
url: "https://pub.dev"
source: hosted
version: "0.1.1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
+3
View File
@@ -265,6 +265,8 @@ dependencies:
url: https://github.com/linagora/twake-previewer-flutter.git url: https://github.com/linagora/twake-previewer-flutter.git
ref: main ref: main
lottie_native: 0.1.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
@@ -324,6 +326,7 @@ flutter:
assets: assets:
- assets/images/ - assets/images/
- assets/icons/ - assets/icons/
- assets/animations/
- env.file - env.file
- configurations/ - configurations/
- configurations/icons/ - configurations/icons/