openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
800 stars 275 forks source link

Smoother splash screen: skip the endless progress part #1185

Closed monsieurtanuki closed 2 years ago

monsieurtanuki commented 2 years ago

Is your feature request related to a problem? Please describe. When we start the app, there's a splash screen, then a circular progress indicator, then the app. With the latest version of flutter_native_splash we could go directly from the splash screen to the fully initialized app, skipping the "empty screen with endless progress" part. That would look nicer. And it's very easy to code.

import 'package:flutter_native_splash/flutter_native_splash.dart';

void main() {
  WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
  FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
  runApp(const MyApp());
}

// whenever your initialization is completed, remove the splash screen:
    FlutterNativeSplash.remove();

Describe the solution you'd like It's not something we do need, but it looks better this way and it's a new feature from a package we already use so why not?

M123-dev commented 2 years ago

Are you going to PR this or should someone else take this

monsieurtanuki commented 2 years ago

@M123-dev Not particularly for me: I've just updated a project of mine and discovered that new splash feature. Feel free to PR. No rush anyway for that type of feature.

monsieurtanuki commented 2 years ago

The question is: what prevents us from upgrading the sdk in pubspec.yaml?

M123-dev commented 2 years ago

Nothing much, since its the min. version I think it only really has an impact for packages, so we could upgrade it as far as available.

Edit: Of course just as fair as in stable release not the neeeewest

monsieurtanuki commented 2 years ago

Done in #1188.