From 058425bb103549f5f346e2f4f30728dfeef4595a Mon Sep 17 00:00:00 2001 From: luke358 Date: Fri, 23 Aug 2024 21:11:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=8E=E5=90=8E=E5=8F=B0=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=89=93=E5=BC=80=20splash=20=E4=B8=8D=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 9 +++++++++ pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 4dca3ad..a6e1317 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_splash_screen/flutter_splash_screen.dart'; import 'package:get/get.dart'; import 'package:podcasts_pro/config/theme.dart'; import 'package:podcasts_pro/constants/routes.dart'; @@ -46,9 +47,17 @@ class _MyAppState extends State with WidgetsBindingObserver { WidgetsBinding.instance.addObserver(this); } + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + super.dispose(); + } + @override void didChangeAppLifecycleState(AppLifecycleState state) { if (state == AppLifecycleState.resumed) { + print("Starting... resumed"); + FlutterSplashScreen.hide(); SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( statusBarColor: Colors.transparent, systemNavigationBarColor: Colors.white, diff --git a/pubspec.yaml b/pubspec.yaml index 64796da..3b66aa9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: podcasts_pro description: "A project to listen to podcasts through RSS subscription links." publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.12 +version: 1.0.13 environment: sdk: '>=3.4.3 <4.0.0'