Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
judemont committed Apr 23, 2024
1 parent 0d3d034 commit cb6c35b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
14 changes: 11 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,18 @@ android {
versionName flutterVersionName
}

signingConfigs {
release {
storeFile file("release-key.jks")
storePassword "iu2t7LwN"
keyAlias "my-key"
keyPassword "iu2t7LwN"
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}

Expand All @@ -65,6 +72,7 @@ android {
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}

}

flutter {
Expand Down
8 changes: 6 additions & 2 deletions lib/screens/settings.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:flutter/material.dart';
import 'package:reciper/screens/home.dart';
import 'package:reciper/screens/pages_layout.dart';
import 'package:reciper/utilities/utils.dart';
import 'package:url_launcher/url_launcher.dart';

Expand All @@ -25,8 +27,10 @@ class Settings extends StatelessWidget {
const SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Utils.import();
Navigator.pop(context);
Utils.import().then((value) => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) =>
const PagesLayout(child: HomePage()))));
},
child: const Text("Import recipes"),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/utilities/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Utils {
});
}

static Future<void> import() async {
static Future<int> import() async {
const XTypeGroup typeGroup = XTypeGroup(
label: 'Reciper export',
extensions: <String>['json'],
Expand All @@ -34,5 +34,6 @@ class Utils {
DatabaseService db = DatabaseService();
db.import(backupContent);
}
return 1;
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.1.0+210
version: 2.1.2+212

environment:
sdk: ">=3.3.1 <4.0.0"
Expand Down

0 comments on commit cb6c35b

Please sign in to comment.