Adoird build migration and update
This commit is contained in:
parent
04f034971f
commit
7a5c8721dd
1062 changed files with 143083 additions and 221 deletions
|
|
@ -75,14 +75,13 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||
} else if (defaultTargetPlatform == TargetPlatform.linux ||
|
||||
defaultTargetPlatform == TargetPlatform.windows) {
|
||||
// Use File Picker to get a save path on Desktop
|
||||
String? outputFile = await FilePicker.platform.saveFile(
|
||||
String? outputFile = await FilePicker.saveFile(
|
||||
dialogTitle: 'Please select where to save your QR Code:',
|
||||
fileName: filename,
|
||||
bytes: imageBytes,
|
||||
);
|
||||
|
||||
if (outputFile != null) {
|
||||
final file = File(outputFile);
|
||||
await file.writeAsBytes(imageBytes);
|
||||
KenLogger.success("Saved to $outputFile");
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'dart:io';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:file_saver/file_saver.dart';
|
||||
|
|
@ -75,13 +74,14 @@ class _MihPersonalQrCodeState extends State<MihPersonalQrCode> {
|
|||
} else if (defaultTargetPlatform == TargetPlatform.linux ||
|
||||
defaultTargetPlatform == TargetPlatform.windows) {
|
||||
// Use File Picker to get a save path on Desktop
|
||||
String? outputFile = await FilePicker.platform.saveFile(
|
||||
String? outputFile = await FilePicker.saveFile(
|
||||
dialogTitle: 'Please select where to save your QR Code:',
|
||||
fileName: filename,
|
||||
bytes: imageBytes,
|
||||
);
|
||||
if (outputFile != null) {
|
||||
final file = File(outputFile);
|
||||
await file.writeAsBytes(imageBytes);
|
||||
// final file = File(outputFile);
|
||||
// await file.writeAsBytes(imageBytes);
|
||||
KenLogger.success("Saved to $outputFile");
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -164,11 +164,9 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||
const SizedBox(width: 10),
|
||||
MihButton(
|
||||
onPressed: () async {
|
||||
FilePickerResult? result =
|
||||
await FilePicker.platform.pickFiles(
|
||||
FilePickerResult? result = await FilePicker.pickFiles(
|
||||
type: FileType.custom,
|
||||
allowedExtensions: ['jpg', 'png', 'pdf'],
|
||||
withData: true,
|
||||
);
|
||||
if (result == null) return;
|
||||
final selectedFile = result.files.first;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue