diff --git a/.idea/misc.xml b/.idea/misc.xml
index 76f3c52..06d5a4e 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,7 +3,10 @@
-
+
+
+
+
\ No newline at end of file
diff --git a/android/.idea/compiler.xml b/android/.idea/compiler.xml
index 82f4fc9..16b9d7e 100644
--- a/android/.idea/compiler.xml
+++ b/android/.idea/compiler.xml
@@ -2,15 +2,20 @@
-
-
-
-
-
+
+
+
+
+
-
+
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/android/.idea/deploymentTargetSelector.xml b/android/.idea/deploymentTargetSelector.xml
new file mode 100644
index 0000000..b268ef3
--- /dev/null
+++ b/android/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml
index 028a287..786697a 100644
--- a/android/.idea/gradle.xml
+++ b/android/.idea/gradle.xml
@@ -4,26 +4,37 @@
diff --git a/android/.idea/kotlinc.xml b/android/.idea/kotlinc.xml
new file mode 100644
index 0000000..e1eea1d
--- /dev/null
+++ b/android/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/.idea/migrations.xml b/android/.idea/migrations.xml
new file mode 100644
index 0000000..f8051a6
--- /dev/null
+++ b/android/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml
index fe0fc87..10b5b50 100644
--- a/android/.idea/misc.xml
+++ b/android/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/android/.idea/modules.xml b/android/.idea/modules.xml
index 9dddca5..1e684d8 100644
--- a/android/.idea/modules.xml
+++ b/android/.idea/modules.xml
@@ -2,7 +2,50 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index aee34d0..9136ed9 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+ throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
@@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
- compileSdkVersion 30
+ compileSdkVersion 34
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@@ -41,8 +41,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "net.broodjeaap.pizzaplanner.pizzaplanner"
- minSdkVersion 16
- targetSdkVersion 30
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
@@ -60,6 +60,7 @@ android {
signingConfig signingConfigs.release
}
}
+ buildToolsVersion '34.0.0'
}
flutter {
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index be7320a..635a78e 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
android:icon="@mipmap/app_icon">
+
+
+
+
+
+
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index a5cf67a..94375e6 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,5 @@
buildscript {
- ext.kotlin_version = '1.3.50'
+ ext.kotlin_version = '1.7.20'
repositories {
google()
jcenter()
@@ -11,7 +11,6 @@ buildscript {
}
}
-
allprojects {
repositories {
google()
@@ -25,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
-}
\ No newline at end of file
+}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index bc6a58a..cfe88f6 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index 44e62bc..796f2ce 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,11 +1,25 @@
-include ':app'
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }()
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ google()
+ }
+}
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version "7.4.2" apply false
+ id "org.jetbrains.kotlin.android" version "1.7.10" apply false
+}
+
+include ":app"
\ No newline at end of file
diff --git a/lib/entities/PizzaRecipe/ingredient.dart b/lib/entities/PizzaRecipe/ingredient.dart
index 15e5edd..ec85822 100644
--- a/lib/entities/PizzaRecipe/ingredient.dart
+++ b/lib/entities/PizzaRecipe/ingredient.dart
@@ -42,4 +42,4 @@ class Ingredient extends HiveObject {
}
return ingredientWeight.toStringAsFixed(0);
}
-}
\ No newline at end of file
+}
diff --git a/lib/entities/PizzaRecipe/pizza_recipe.dart b/lib/entities/PizzaRecipe/pizza_recipe.dart
index 60a43a7..d9c19f4 100644
--- a/lib/entities/PizzaRecipe/pizza_recipe.dart
+++ b/lib/entities/PizzaRecipe/pizza_recipe.dart
@@ -1,10 +1,9 @@
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
-import 'package:pizzaplanner/util.dart';
-
import 'package:pizzaplanner/entities/PizzaRecipe/ingredient.dart';
import 'package:pizzaplanner/entities/PizzaRecipe/recipe_step.dart';
import 'package:pizzaplanner/entities/PizzaRecipe/recipe_substep.dart';
+import 'package:pizzaplanner/util.dart';
import 'package:yaml/yaml.dart';
part 'pizza_recipe.g.dart';
@@ -64,7 +63,7 @@ class PizzaRecipe extends HiveObject {
TableCell(child: Center(child: Text("Per Ball"))),
TableCell(child: Center(child: Text("Total"))),
]
- )
+ ),
] +
ingredients.map((ingredient) =>
@@ -93,9 +92,10 @@ class PizzaRecipe extends HiveObject {
return fromParsedYaml(loadYaml(yamlString) as YamlMap);
}
- static Future fromParsedYaml(YamlMap recipe) async {
- if (recipe.containsKey("recipe")){
- recipe = recipe["recipe"] as YamlMap;
+ static Future fromParsedYaml(YamlMap recipeIn) async {
+ var recipe = recipeIn;
+ if (!recipeIn.containsKey("recipe")){
+ recipe = recipeIn["recipe"] as YamlMap;
}
final String name = recipe["name"] as String;
final String? image = recipe.containsKey("image") ? recipe["image"] as String : null;
diff --git a/lib/main.dart b/lib/main.dart
index e30182d..94d7c50 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
-import 'package:flutter_native_timezone/flutter_native_timezone.dart';
+import 'package:flutter_native_timezone_updated_gradle/flutter_native_timezone.dart';
import 'package:pizzaplanner/entities/pizza_event.dart';
import 'package:pizzaplanner/entities/PizzaRecipe/ingredient.dart';
import 'package:pizzaplanner/entities/PizzaRecipe/pizza_recipe.dart';
@@ -121,7 +121,7 @@ class PizzaPlannerState extends State {
headline3: TextStyle(fontSize: 50, color: Color.fromARGB(255, 10, 10, 10)),
),
primaryColor: const Color.fromARGB(255, 200, 42, 53),
- buttonColor: const Color.fromARGB(255, 200, 42, 53),
+ primaryColorDark: const Color.fromARGB(255, 200, 42, 53),
highlightColor: const Color.fromARGB(255, 53, 200, 42),
)
);
diff --git a/lib/pages/add_pizza_event_page.dart b/lib/pages/add_pizza_event_page.dart
index 93bef36..5145e8e 100644
--- a/lib/pages/add_pizza_event_page.dart
+++ b/lib/pages/add_pizza_event_page.dart
@@ -1,7 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
+import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
import 'package:fluttericon/font_awesome5_icons.dart';
import 'package:pizzaplanner/entities/pizza_event.dart';
@@ -150,7 +150,7 @@ class AddPizzaEventPageState extends State {
width: double.infinity,
height: 70,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () async {
@@ -253,7 +253,7 @@ class ConfirmPizzaEventState extends State {
width: double.infinity,
height: 50,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
DatePicker.showDateTimePicker(context,
@@ -293,7 +293,7 @@ class ConfirmPizzaEventState extends State {
width: double.infinity,
height: 70,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () async {
Navigator.pop(context, eventTime);
diff --git a/lib/pages/add_recipe_url.dart b/lib/pages/add_recipe_url.dart
index 3fd2105..dc7b8ec 100644
--- a/lib/pages/add_recipe_url.dart
+++ b/lib/pages/add_recipe_url.dart
@@ -45,7 +45,7 @@ class AddRecipeURLPageState extends State {
Expanded(
flex: 5,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
diff --git a/lib/pages/archived_pizza_event_page.dart b/lib/pages/archived_pizza_event_page.dart
index c11502d..399011e 100644
--- a/lib/pages/archived_pizza_event_page.dart
+++ b/lib/pages/archived_pizza_event_page.dart
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:pizzaplanner/entities/pizza_event.dart';
-import 'package:pizzaplanner/pages/pizza_event_page.dart';
import 'package:pizzaplanner/pages/scaffold.dart';
import 'package:pizzaplanner/widgets/pizza_event_widget.dart';
diff --git a/lib/pages/edit_recipe_page.dart b/lib/pages/edit_recipe_page.dart
index d6533b8..174c24e 100644
--- a/lib/pages/edit_recipe_page.dart
+++ b/lib/pages/edit_recipe_page.dart
@@ -87,7 +87,7 @@ class EditRecipePageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
@@ -108,7 +108,7 @@ class EditRecipePageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
@@ -126,7 +126,7 @@ class EditRecipePageState extends State {
),
const Divider(),
Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
setState(() {
@@ -145,7 +145,7 @@ class EditRecipePageState extends State {
child: Text("Steps")
),
Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
setState(() {
@@ -161,7 +161,7 @@ class EditRecipePageState extends State {
] + pizzaRecipe.recipeSteps.map((recipeStep) => buildRecipeStepRow(recipeStep)).toList() + [
const Divider(),
Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
@@ -287,7 +287,7 @@ class EditRecipePageState extends State {
Expanded(
flex: 4,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
FocusScope.of(context).unfocus();
diff --git a/lib/pages/edit_recipe_step_page.dart b/lib/pages/edit_recipe_step_page.dart
index 8eeff06..5d3fd75 100644
--- a/lib/pages/edit_recipe_step_page.dart
+++ b/lib/pages/edit_recipe_step_page.dart
@@ -66,7 +66,7 @@ class EditRecipeStepPageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
@@ -87,7 +87,7 @@ class EditRecipeStepPageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
@@ -157,7 +157,7 @@ class EditRecipeStepPageState extends State {
const Divider(),
const Center(child: Text("Sub Steps")),
Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
setState(() {
@@ -185,7 +185,7 @@ class EditRecipeStepPageState extends State {
Expanded(
flex: 4,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
FocusScope.of(context).unfocus();
diff --git a/lib/pages/edit_recipe_sub_step_page.dart b/lib/pages/edit_recipe_sub_step_page.dart
index b682245..2d3e1dc 100644
--- a/lib/pages/edit_recipe_sub_step_page.dart
+++ b/lib/pages/edit_recipe_sub_step_page.dart
@@ -58,7 +58,7 @@ class EditRecipeSubStepPageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
@@ -79,7 +79,7 @@ class EditRecipeSubStepPageState extends State {
Expanded(
flex: 2,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
diff --git a/lib/pages/pizza_event_notification_page.dart b/lib/pages/pizza_event_notification_page.dart
index 1e5b33a..7702024 100644
--- a/lib/pages/pizza_event_notification_page.dart
+++ b/lib/pages/pizza_event_notification_page.dart
@@ -1,6 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
+import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_ringtone_player/flutter_ringtone_player.dart';
import 'package:hive/hive.dart';
@@ -77,7 +77,7 @@ class PizzaEventNotificationState extends State {
Expanded(
flex: 10,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
@@ -93,7 +93,7 @@ class PizzaEventNotificationState extends State {
Expanded(
flex: 30,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
@@ -123,7 +123,7 @@ class PizzaEventNotificationState extends State {
Expanded(
flex: 40,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
diff --git a/lib/pages/pizza_event_page.dart b/lib/pages/pizza_event_page.dart
index 12ce92b..26ff514 100644
--- a/lib/pages/pizza_event_page.dart
+++ b/lib/pages/pizza_event_page.dart
@@ -51,7 +51,7 @@ class PizzaEventPageState extends State {
style: Theme.of(context).textTheme.subtitle1
),
Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
Navigator.pushNamed(context, RecipePage.route, arguments: widget.pizzaEvent.recipe);
@@ -104,7 +104,7 @@ class PizzaEventPageState extends State {
),
const Divider(),
if (firstStepDue != null) Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {
diff --git a/lib/pages/pizza_events_page.dart b/lib/pages/pizza_events_page.dart
index 501b504..cfd41ca 100644
--- a/lib/pages/pizza_events_page.dart
+++ b/lib/pages/pizza_events_page.dart
@@ -123,7 +123,7 @@ class PizzaEventsState extends State {
}
},
tooltip: "Add Pizza Plans",
- backgroundColor: Theme.of(context).buttonColor,
+ backgroundColor: Theme.of(context).primaryColor,
child: Center(
child: Row(
children: const [
diff --git a/lib/pages/recipe_step_instruction_page.dart b/lib/pages/recipe_step_instruction_page.dart
index b78ff8e..4f8cb79 100644
--- a/lib/pages/recipe_step_instruction_page.dart
+++ b/lib/pages/recipe_step_instruction_page.dart
@@ -92,7 +92,7 @@ class RecipeStepInstructionState extends State {
flex: 15,
child: Container(
width: double.infinity,
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
if (page == 0){
@@ -116,7 +116,7 @@ class RecipeStepInstructionState extends State {
flex: 35,
child: Container(
width: double.infinity,
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
if (page == widget.recipeStep.subSteps.length){
diff --git a/lib/pages/recipes_page.dart b/lib/pages/recipes_page.dart
index bd1d4e6..df2a6d9 100644
--- a/lib/pages/recipes_page.dart
+++ b/lib/pages/recipes_page.dart
@@ -153,7 +153,7 @@ class RecipesPageState extends State {
Expanded(
flex: 5,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
@@ -193,7 +193,7 @@ class RecipesPageState extends State {
Expanded(
flex: 5,
child: Container(
- color: Theme.of(context).buttonColor,
+ color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {
@@ -216,9 +216,12 @@ class RecipesPageState extends State {
if (result == null){
return;
}
-
+ final path = result.files.single.path ?? "";
+ if (path == "") {
+ return;
+ }
try {
- File(result.files.single.path).readAsString().then((String contents) async {
+ File(path).readAsString().then((String contents) async {
final pizzaRecipe = await PizzaRecipe.fromYaml(contents);
final pizzaRecipeBox = Hive.box(PizzaRecipe.hiveName);
pizzaRecipeBox.add(pizzaRecipe);
diff --git a/lib/util.dart b/lib/util.dart
index edfdc55..066ce9d 100644
--- a/lib/util.dart
+++ b/lib/util.dart
@@ -44,7 +44,6 @@ Future> getRecipesFromGithub() async {
returnRecipeList.add(await PizzaRecipe.fromParsedYaml(recipe as YamlMap));
}
return returnRecipeList;
- return const [];
}
Future loadAsset(String path) async {
diff --git a/pubspec.yaml b/pubspec.yaml
index 7400370..609b253 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.1.0
+version: 1.2.0
environment:
sdk: ">=2.12.0 <3.0.0"
@@ -29,10 +29,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.3
fluttericon: ^2.0.0
- flutter_datetime_picker:
- git:
- url: https://github.com/AlexHartford/flutter_datetime_picker.git
- ref: "df4ed6fc2e24725604e90f79aedb98a7af7fb04d"
+ flutter_datetime_picker_plus: ^2.2.0
yaml: ^3.1.0
hive: ^2.0.4
@@ -41,7 +38,7 @@ dependencies:
rxdart: ^0.27.1
timezone: ^0.7.0
- flutter_native_timezone: ^2.0.0
+ flutter_native_timezone_updated_gradle: ^2.0.0
flutter_local_notifications: ^8.0.0
flutter_markdown: ^0.6.4