-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'LinwoodDev:develop' into develop
- Loading branch information
Showing
166 changed files
with
61,657 additions
and
1,667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.16.8 | ||
3.16.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// ignore_for_file: avoid_web_libraries_in_flutter | ||
|
||
import 'dart:html'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
Future<void> exportFile( | ||
BuildContext context, | ||
List<int> bytes, | ||
String fileExtension, | ||
String mimeType, | ||
) async { | ||
final a = document.createElement('a') as AnchorElement; | ||
// Create data URL | ||
final blob = Blob([bytes], 'text/plain'); | ||
final url = Url.createObjectUrl(blob); | ||
a.href = url; | ||
a.download = 'output.$fileExtension'; | ||
a.click(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'dart:io'; | ||
import 'dart:typed_data'; | ||
|
||
import 'package:file_selector/file_selector.dart' as fs; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:share_plus/share_plus.dart'; | ||
|
||
Future<void> exportFile( | ||
BuildContext context, | ||
List<int> bytes, | ||
String fileExtension, | ||
String mimeType, | ||
) async { | ||
final file = fs.XFile.fromData(Uint8List.fromList(bytes), | ||
mimeType: mimeType, name: 'output.$fileExtension'); | ||
if (Platform.isAndroid || Platform.isIOS) { | ||
Share.shareXFiles([file]); | ||
return; | ||
} | ||
final result = await fs.getSaveLocation( | ||
acceptedTypeGroups: [ | ||
fs.XTypeGroup( | ||
label: AppLocalizations.of(context).export, | ||
extensions: [fileExtension], | ||
mimeTypes: [mimeType], | ||
), | ||
], | ||
); | ||
if (result == null) return; | ||
await file.saveTo(result.path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
Future<void> exportFile( | ||
BuildContext context, | ||
List<int> bytes, | ||
String fileExtension, | ||
String mimeType, | ||
) async {} |
Oops, something went wrong.