jonbhanson / flutter_native_splash

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.
https://pub.dev/packages/flutter_native_splash
MIT License
1.29k stars 202 forks source link

I want to remove `flutter_native_splash` from my project. #553

Closed meet7-sagar23 closed 1 year ago

meet7-sagar23 commented 1 year ago

I have already removed flutter_native_splash from pubspec.yaml. Also, the image is also deleted from the assets folder.

Still I am seeing the native splash.

How do I revert back to the flutter splash screen?

jonbhanson commented 1 year ago
  # To restore Flutter's default white splash screen, run the following command in the terminal:
  # flutter pub run flutter_native_splash:remove
meet7-sagar23 commented 1 year ago

Tried that, but not working at all. @jonbhanson

pushkar-appdid commented 1 year ago
  # To restore Flutter's default white splash screen, run the following command in the terminal:
  # flutter pub run flutter_native_splash:remove

Getting this error while executing above command.

Restoring Flutter's default native splash screen... Unhandled exception: LateInitializationError: Field '_flavorHelper@20018413' has not been initialized.

0 _flavorHelper (package:flutter_native_splash/cli_commands.dart)

1 getConfig (package:flutter_native_splash/cli_commands.dart:246:14)

2 removeSplash (package:flutter_native_splash/cli_commands.dart:184:18)

3 main. (file:///C:/Users/Appdid/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_native_splash-2.2.0+1/bin/remove.dart:6:49)

4 Parser.parse. (package:args/src/parser.dart:107:15)

5 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)

6 MapView.forEach (dart:collection/maps.dart:342:10)

7 Parser.parse (package:args/src/parser.dart:95:22)

8 ArgParser.parse (package:args/src/arg_parser.dart:334:42)

9 main (file:///C:/Users/Appdid/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_native_splash-2.2.0+1/bin/remove.dart:7:10)

10 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:295:33)

11 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:192:26)

pub finished with exit code 255

meet7-sagar23 commented 1 year ago

Worst package. I executed the flutter pub run flutter_native_splash:remove command, yet the background image that I used to set up native splash is visible. You guys should understand this problem. Why isn't there any kind of revert or follow-up on the same. I've trying to fix this problem from last 1 month. Still I can't remove the flutter_native_splash from my flutter project. @jonbhanson, this was for you. Please take a look into it asap. This is seriously sheer waste of time nothing more than that. And you guys call yourself developer. YOU'RE NOTHING BUT JUST A BUNCH OF STUPID CODERS NOT DEVELOPERS

clragon commented 1 year ago

thats unnecessarily rude.

I dont know about fixing the inbuilt removal, but the easiest way of removing the splash screen is by (make sure your VCS is engaged):

  1. delete your android folder
  2. run flutter create your_project again
  3. restore any config files you have altered

by recreating your android folder with the flutter create command, you are resetting to the default. You then just have to restore any files you have adjusted yourself, if any.

FaisaljanBaloch commented 1 year ago

You can try commands, such as flutter clean, which will remove these splash screens and old cache files. And then re-run your project using flutter run command.

jonbhanson commented 1 year ago

I had reopened this ticket to investigate the problem. However, seeing @meet7-sagar23 edit their comment with insults, I will not be helping. @pushkar-appdid if you are still having a problem, please open an new ticket and include your configuration.

nived-s commented 8 months ago

image just make sure all the code related to flutter_native_splash still remains in projected not in commented form

jantheok commented 8 months ago

For me, I had to delete also the build / ios / android (and othe platform) folders and remove the flutter_native_splash reference in pubspec.yaml. My steps were: 1) in Terminal run "flutter pub run flutter_native_splash:remove" 2) run "flutter pub remove flutter_native_splash" 3) delete flutter_native_splash reference in pubspec.yaml 4) delete folders: build / ios / android (and other platform specific folders) 5) run "flutter clean" 6) run "flutter pub get" 7) reenable my platforms (by writting e.g. "Enable android for this project" in the command center

dvdnhm commented 7 months ago

@jonbhanson I would be pissed off over such a d..k comment too but this issue is real and this thread comes up in google search.

if there is an update, please update this thread too

jonbhanson commented 7 months ago

@dvdnhm please open a new ticket with your config details and instructions on how to reproduce this problem and I will take a look at your ticket.

SaanPrasanna commented 4 months ago

I have already removed flutter_native_splash from pubspec.yaml. Also, the image is also deleted from the assets folder.

Still I am seeing the native splash. How do I revert back to the flutter splash screen?

I think this is simplest way to remove flutter_native_splash from your project.

Note:

  1. If you remove the flutter_native_splash package from your pubspec.yaml file, need to add again (flutter pub add flutter_native_splash).
  2. Then if not exist add this two lines to pubspec.yaml file
    flutter_native_splash:
    android_12:

    Then run this commands

  3. flutter pub run flutter_native_splash:remove
  4. flutter clean
  5. flutter pub get
zainulabdn commented 3 months ago

how can i remove by default native splash screen which is show on android version 12 above?

jonbhanson commented 3 months ago

how can i remove by default native splash screen which is show on android version 12 above?

@zainulabdn you cannot remote the splash screen from Android 12+. "The splash screen experience brings standard design elements to every app launch, but it's also customizable so your app can maintain its unique branding." Splash screens.