saveString function

Future<void> saveString({
  1. required String printName,
  2. required String fileType,
  3. required String bytes,
  4. required String path,
  5. bool isBytes = true,
})

Save file as string to location

Implementation

Future<void> saveString({
  required String printName,
  required String fileType,
  required String bytes,
  required String path,
  bool isBytes = true
}) async {
  await File('$path/$printName.$fileType').writeAsString(bytes);
}