flutter_native_splash icon indicating copy to clipboard operation
flutter_native_splash copied to clipboard

App stuck in splash screen android wehn using FlutterNativeSplash.preserve

Open yunesuk opened this issue 3 years ago • 2 comments

Attention: If you open a bug report without sufficient details, it will be closed. Is your question related to Android 12? Please check the notes on Android 12 first (https://pub.dev/packages/flutter_native_splash#android-12-support).

Describe the bug App stuck in splash screen android wehn using FlutterNativeSplash.preserve it works fine on ios and this appears in log ininite logs 898 I/ViewRootImpl@6218d0e[MainActivity]( 9667): [DP] cancelDraw io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@36bce22 isViewVisible: true

Configuration

Paste the flutter_native_splash section of your yaml config. ` flutter_native_splash: color: "#9333ea" image: assets/images/splash_icon.png

` Device (please complete the following information):

  • Device: [android emulator / real device]
  • OS: [e.g. android ]

To Reproduce

void main() {
  WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();

  FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
  runApp(const MyApp());
}

Screenshots If applicable, add screenshots to help explain your problem. If in doubt, attach a screenshot.

Additional context Add any other context about the problem here.

yunesuk avatar Jun 20 '23 09:06 yunesuk

Did you call FlutterNativeSplash.remove(); after you are done with initializing?

dotsdevelopers avatar Jun 20 '23 12:06 dotsdevelopers

Did you call FlutterNativeSplash.remove(); after you are done with initializing?

yes i was calling it on widget splash dispose . the problem solved whn i used go_router

yunesuk avatar Jun 20 '23 19:06 yunesuk