Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
waozixyz committed Dec 13, 2024
1 parent 4af86af commit 830b4e1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## [1.3.7] - 2024-12-12
- Fix android export

## [1.3.6] - 2024-09-23
- Bug fixes

Expand Down
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class AppState extends State<App> {
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
LocalJsonLocalization.delegate,
],
supportedLocales: [
Expand Down
19 changes: 12 additions & 7 deletions lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,31 @@ class _SettingsScreenState extends State<SettingsScreen> {
}

Future<void> _exportData() async {
final userProvider = Provider.of<UserProvider>(context, listen: false);
final data = await userProvider.getAllData();
final jsonString = jsonEncode(data);

try {
final userProvider = Provider.of<UserProvider>(context, listen: false);
final data = await userProvider.getAllData();
final jsonString = jsonEncode(data);

String formattedDate =
DateFormat('yyyyMMdd_HHmmss').format(DateTime.now());
String fileName = 'InnerBreeze_$formattedDate.json';
Uint8List bytes = Uint8List.fromList(utf8.encode(jsonString));

await FileSaver.instance.saveFile(
// Try saving with a different method for Android
String? filePath = await FileSaver.instance.saveAs(
name: fileName,
bytes: bytes,
ext: 'json',
mimeType: MimeType.json,
);

_showSnackBar('data_exported_success'.i18n() + fileName);
if (filePath != null) {
_showSnackBar('${'data_exported_success'.i18n()} to: $filePath');
} else {
_showSnackBar('${'error_exporting_data'.i18n()}: File path is null');
}
} catch (e) {
_showSnackBar('error_exporting_data'.i18n() + e.toString());
_showSnackBar('${'error_exporting_data'.i18n()}: $e');
}
}

Expand Down
2 changes: 2 additions & 0 deletions metadata/en-US/changelogs/35.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Fix android export

7 changes: 7 additions & 0 deletions metadata/io.naox.InnerBreeze.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
<icon type="remote" height="144" width="144">https://raw.githubusercontent.com/naoxio/inbreeze/main/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png</icon>
<update_contact>[email protected]</update_contact>
<releases>
<release version="1.3.7" date="2024-12-12">
<description>
<ul>
<li>Fix android export</li>
</ul>
</description>
</release>
<release version="1.3.6" date="2024-09-23">
<description>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A meditation and breathing guide app

publish_to: 'none'

version: 1.3.6+34
version: 1.3.7+35

environment:
sdk: '>=2.19.4 <4.0.0'
Expand Down

0 comments on commit 830b4e1

Please sign in to comment.