Dart package to generate temporary file with any extension or file type in local directory of the device.
getanytempfile.dart
is a Dart package that provides a simple and efficient way to create temporary
files of any extension in a temporary directory.
Add the following dependency to your pubspec.yaml:
dependencies:getAnyTempFile: ^
1.0
.0
Then run:
$ dart pub get
void main() {
var getAnyTempFile = GetAnyTempFile();
///Generate .png temp file
print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
prefixName: 'mytemp', fileName: 'getMyTemp')}');
///Generate .jpeg temp file
print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'jpeg')}');
///Generate .mp4 temp file
print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'mp4')}');
///Generate .mp3 temp file
print('getAnyTempFile: ${getAnyTempFile.getAnyTempFile(
prefixName: 'mytemp', fileName: 'getMyTemp', fileType: 'mp3')}');
}
getAnyTempFile() method returns a File object that represents the created temporary file. You can specify the extension of the file by providing the extension argument. If not specified, the default extension is .png.
File the Issue here
🤘🏻 Then it's Great! Fork the Repo Update Code, write a meaningful commit message. Send a PR. That's all you need to contribute.