From 24912a394c2c870be101037f8ae19a24bd04c911 Mon Sep 17 00:00:00 2001 From: Abemelekermi <103841321+Abemelekermi@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:10:27 +0300 Subject: [PATCH] added the animated logo to the splash screen --- lib/main.dart | 5 +++-- pubspec.lock | 8 ++++++++ pubspec.yaml | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 6cfd723..2d48c26 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,6 +4,7 @@ import "package:arxiv/models/paper.dart"; import "package:arxiv/pages/home_page.dart"; import "package:flutter/material.dart"; import "package:hive_flutter/hive_flutter.dart"; +import "package:lottie/lottie.dart"; import 'package:theme_provider/theme_provider.dart'; void main() async { @@ -134,8 +135,8 @@ class _MyAppState extends State { .scaffoldBackgroundColor, height: MediaQuery.of(context).size.height, width: MediaQuery.of(context).size.width, - child: - Image.asset("assets/icon/icon-removebg-preview.png"), + child: Lottie.asset( + "assets/animation/ScholArxivLoader.json"), ), onAnimationEnd: () => debugPrint("On Fade In End"), nextScreen: const HomePage(), diff --git a/pubspec.lock b/pubspec.lock index 5c8a794..25620e2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -528,6 +528,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" + url: "https://pub.dev" + source: hosted + version: "3.1.2" markdown: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 509e72e..fe00ed2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,7 @@ dependencies: animated_text_kit: ^4.2.2 loading_animation_widget: ^1.2.1 another_flutter_splash_screen: ^1.2.1 - + lottie: ^3.1.2 dev_dependencies: flutter_test: sdk: flutter @@ -101,6 +101,7 @@ flutter: assets: - assets/system_message_templates/ - assets/icon/ + - assets/animation/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware