Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to rename file in flutter

import 'package:path_provider/path_provider.dart';

...
...

PickedFile pickedFile = await _picker.getImage(source: ImageSource.camera);

// Save and Rename file to App directory
String dir = (await getApplicationDocumentsDirectory()).path;
String newPath = path.join(dir, 'case01wd03id01.jpg');
File f = await File(pickedF.path).copy(newPath);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rename #file #flutter
ADD COMMENT
Topic
Name
1+6 =