How can I delete assets specified in pubspec.yaml in flutter? - flutter

In my flutter app, I need an asset just for the first start of the app and want to delete it afterwards. Is that possible?
I'm primarily using flutter for Android, so a platform specific answer would also be appreciated, if it's not possible to do with Dart Code.

It's impossible currently.
The rootBundle contains the resources that were packaged with the
application when it was built. To add resources to the rootBundle for
your application, add them to the assets subsection of the flutter
section of your application's pubspec.yaml manifest.
It's packaged with the app on build time, and it can't be modified.

Why don't you enable to read your assets anytime and handle the possibility of displaying in your code by condition.

Related

Addition of plugins to React native app without using expo and without modifiying AndroidManifest.xml and info.plist files

I would like to add plugins like camera, scanner in an react-native-app but this involves addition of some additional code into AndroidManifest.xml and info.plist file for enabling plugin permissions
Whereas I would like to add the plugins at one place and it should update in appropriate Android and iOS files, similar to that of config.xml file configuration in cordova apps.
Are there any libraries available to implement in this way ?
Thanks
Unfortunately no. Adding libraries that deal with permissions has always been a bit of a struggle in react native, where you have to touch the android and iOS files and often times specify why your app requires those permissions in the first place. It gets a bit more complicated as different android versions have different ways to deal with permissions.
The good news is that most of the libraries you'll want to add provide a detailed documentation on how to set them up properly which does not take too long after you get the gist of it.

Getting the original File/Image path after picking it using Flutter

I am developing a photo vault using Flutter. I need to list all the images in the mobile storage, and when the user picks one or more images. I need to move that image(s) into App Private. So that no other app can see it. So for moving the file, I need the location/path of the picked image(s). which no plugin on earth is providing.
Below is the list of plugins I tried. Each one of them provides the path of the image copied to the app private directory. No the original one
file_picker 2.1.6
image_picker 0.6.7+22
multi_image_picker 4.7.15
It would be a big help if you could suggestion some solution for it.
Thank You

If I include asset images from my PC in my flutter app and publish it on the Play Store, will the images appear in the app?

I have included images from my PC instead of web images, do I need to use web images instead ?
You can include images from your PC too! But make sure you maintain a proper assets folder and update in pubspec.yaml such that you can use it in your app.
Refer: https://flutter.dev/docs/development/ui/assets-and-images

Flutter drag and drop inside UI in desktop application

Talking about a desktop application now, not mobile or web.
Is it any widget in Flutter that will allow, for example, drag a folder, drop it in the application UI, and the app will read for example the path to that file or folder?
I have been reading about Draggable and DragTarget in Flutter, but i do think they are used for that purpose.
NOTE: it might not exist a widget for that purpose, so a strategy on how to do that in Flutter will also be appreciated.
Assuming you're talking about dragging from outside the application, it's not currently supported; Flutter #30719 would be the issue to watch/upvote.
Depending on the specific platform you might be able to implement it with a plugin in the short term (if you are familiar with native development on that platform), but that would likely be more work than contributing an implementation to Flutter itself.
Flutter has a dependency to support such behavior now. Check this link
https://pub.dev/packages/desktop_drop

Intel XDK - Set Splash Screen

I was trying to build an android apk using Intel XDK.I just want to know if there is an option to set the splash screen, icons, application title in some build properties file rather than choosing it everytime you build the apk.
In the current build system the build menu is the only way to specify these assets. However, each time you build your app it will reuse the assets you provided initially. If you create a new project you'll have to provide them again.
In the Cordova build option you provide these assets by specifying them in an intelxdk.config.xml file. This is probably closer to what you are looking for. In the next major release we'll also be providing a way to provide those directly in the XDK, rather than on-line, but only for Cordova build options. However, there will be more flexibility in how you provide those assets, which will be easier to explain once that version of the XDK "hits the streets."
Sorry, but company policy does not allow me to provide a release date. All I can say is that it will be coming in the near future.