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'