xxxxxxxxxx
//add path provider to pubspec.yaml
path_provider: ^2.0.15
import 'package:path_provider/path_provider.dart';
final directory = await getApplicationDocumentsDirectory();
File file = File('${directory.path}/desirednametocallfile');
await file.writeAsBytes(uint8List);