Quantcast
Channel: How to convert asset image to File? - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Prince for How to convert asset image to File?

Get File from Asset without providing a path.import 'package:path_provider/path_provider.dart';Future<File> getImageFileFromAssets(Asset asset) async { final byteData = await asset.getByteData();...

View Article



Answer by Mohd Danish Khan for How to convert asset image to File?

Make use of flutter_absolute_path package.flutter_absolute_path: ^1.0.6In pubsec.yamlTo convert file path from this format...

View Article

Answer by creativecreatorormaybenot for How to convert asset image to File?

You can access the byte data via rootBundle. Then, you can save it to the device's temporary directory which is obtained by path_provider (you need to add it as a dependency).import 'dart:async';import...

View Article

How to convert asset image to File?

Is there a way to use an asset image as a File.I need a File so it can be used for testing it over the internet using http. I've tried some answers from Stackoverflow.com (How to load images with...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images