Updated the project to work in android studio 2023.3.1

This commit is contained in:
david 2024-05-03 12:27:38 +02:00
parent b07fba6877
commit 3905c53326
29 changed files with 204 additions and 87 deletions

5
.idea/misc.xml generated
View file

@ -3,7 +3,10 @@
<component name="FrameworkDetectionExcludesConfiguration">
<type id="android" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="Android API 31 Platform" project-jdk-type="Android SDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_20" project-jdk-name="Android API 34, extension level 7 Platform" project-jdk-type="Android SDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="ProjectType">
<option name="id" value="io.flutter" />
</component>
</project>

View file

@ -2,15 +2,20 @@
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8">
<module name="android.app" target="11" />
<module name="android.file_picker" target="11" />
<module name="android.flutter_local_notifications" target="11" />
<module name="android.flutter_plugin_android_lifecycle" target="11" />
<module name="android.flutter_ringtone_player" target="11" />
<module name="android.app" target="17" />
<module name="android.file_picker" target="17" />
<module name="android.flutter_local_notifications" target="17" />
<module name="android.flutter_plugin_android_lifecycle" target="17" />
<module name="android.flutter_ringtone_player" target="17" />
<module name="android.path_provider" target="11" />
<module name="android.share_plus" target="11" />
<module name="android.path_provider_android" target="17" />
<module name="android.share_plus" target="17" />
<module name="android.url_launcher" target="11" />
<module name="android.vibration" target="11" />
<module name="android.url_launcher_android" target="17" />
<module name="android.vibration" target="17" />
<module name="gradle" target="17" />
<module name="gradle.main" target="17" />
<module name="gradle.test" target="17" />
</bytecodeTargetLevel>
</component>
</project>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

View file

@ -4,26 +4,37 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT">
<builds>
<build path="$PROJECT_DIR$/../../../../../tools/flutter/packages/flutter_tools/gradle" name="gradle">
<projects>
<project path="$PROJECT_DIR$/../../../../../tools/flutter/packages/flutter_tools/gradle" />
</projects>
</build>
</builds>
</compositeBuild>
</compositeConfiguration>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="C:/ProgramData/chocolatey/lib/gradle/tools/gradle-7.1" />
<option name="gradleHome" value="$PROJECT_DIR$/../../../../../ProgramData/chocolatey/lib/gradle/tools/gradle-7.1" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-4.0.2/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-8.1.1+1/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_native_timezone-2.0.0/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.3/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ringtone_player-3.0.0/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.3/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/share_plus-2.1.4/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.9/android" />
<option value="$PROJECT_DIR$/../../../lib/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.7.4-nullsafety.0/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/file_picker-4.6.1/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_local_notifications-8.1.1+1/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_native_timezone_updated_gradle-2.0.3/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.19/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_ringtone_player-3.2.0/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.2.4/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/share_plus-2.2.0/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_android-6.3.1/android" />
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vibration-1.7.7/android" />
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/../../../../../tools/flutter/packages/flutter_tools/gradle" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>

6
android/.idea/kotlinc.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.7.20" />
</component>
</project>

10
android/.idea/migrations.xml generated Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View file

@ -2,7 +2,50 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/android.iml" filepath="$PROJECT_DIR$/.idea/android.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/android.iml" filepath="$PROJECT_DIR$/.idea/modules/android.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/android.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/android.app.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/android.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/android.app.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/android.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/android.app.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/android.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/android.app.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.iml" filepath="$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.main.iml" filepath="$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/664153905/android.file_picker.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.iml" filepath="$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-189297514/android.flutter_local_notifications.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.iml" filepath="$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-1893818806/android.flutter_native_timezone_updated_gradle.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.iml" filepath="$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.main.iml" filepath="$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/383427052/android.flutter_plugin_android_lifecycle.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.iml" filepath="$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.main.iml" filepath="$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/399383413/android.flutter_ringtone_player.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.iml" filepath="$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-529228936/android.path_provider_android.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.iml" filepath="$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-804715113/android.share_plus.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.iml" filepath="$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-2045426685/android.url_launcher_android.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.iml" filepath="$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/-508181482/android.vibration.unitTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-679872415/gradle.iml" filepath="$PROJECT_DIR$/.idea/modules/-679872415/gradle.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-679872415/gradle.main.iml" filepath="$PROJECT_DIR$/.idea/modules/-679872415/gradle.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/-679872415/gradle.test.iml" filepath="$PROJECT_DIR$/.idea/modules/-679872415/gradle.test.iml" />
</modules>
</component>
</project>

View file

@ -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 {

View file

@ -5,6 +5,7 @@
android:icon="@mipmap/app_icon">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@ -33,12 +34,28 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver"
android:exported="true"
/>
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.VIBRATE"/>
</manifest>

View file

@ -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
}

View file

@ -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

View file

@ -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"

View file

@ -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<PizzaRecipe> fromParsedYaml(YamlMap recipe) async {
if (recipe.containsKey("recipe")){
recipe = recipe["recipe"] as YamlMap;
static Future<PizzaRecipe> 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;

View file

@ -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<PizzaPlanner> {
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),
)
);

View file

@ -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<AddPizzaEventPage> {
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<ConfirmPizzaEventDialog> {
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<ConfirmPizzaEventDialog> {
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);

View file

@ -45,7 +45,7 @@ class AddRecipeURLPageState extends State<AddRecipeURLPage> {
Expanded(
flex: 5,
child: Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {

View file

@ -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';

View file

@ -87,7 +87,7 @@ class EditRecipePageState extends State<EditRecipePage> {
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<EditRecipePage> {
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<EditRecipePage> {
),
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<EditRecipePage> {
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<EditRecipePage> {
] + 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<EditRecipePage> {
Expanded(
flex: 4,
child: Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
FocusScope.of(context).unfocus();

View file

@ -66,7 +66,7 @@ class EditRecipeStepPageState extends State<EditRecipeStepPage> {
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<EditRecipeStepPage> {
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<EditRecipeStepPage> {
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<EditRecipeStepPage> {
Expanded(
flex: 4,
child: Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
child: TextButton(
onPressed: () {
FocusScope.of(context).unfocus();

View file

@ -58,7 +58,7 @@ class EditRecipeSubStepPageState extends State<EditRecipeSubStepPage> {
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<EditRecipeSubStepPage> {
Expanded(
flex: 2,
child: Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {

View file

@ -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<PizzaEventNotificationPage> {
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<PizzaEventNotificationPage> {
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<PizzaEventNotificationPage> {
Expanded(
flex: 40,
child: Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () async {

View file

@ -51,7 +51,7 @@ class PizzaEventPageState extends State<PizzaEventPage> {
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<PizzaEventPage> {
),
const Divider(),
if (firstStepDue != null) Container(
color: Theme.of(context).buttonColor,
color: Theme.of(context).primaryColor,
width: double.infinity,
child: TextButton(
onPressed: () {

View file

@ -123,7 +123,7 @@ class PizzaEventsState extends State<PizzaEventsPage> {
}
},
tooltip: "Add Pizza Plans",
backgroundColor: Theme.of(context).buttonColor,
backgroundColor: Theme.of(context).primaryColor,
child: Center(
child: Row(
children: const <Widget>[

View file

@ -92,7 +92,7 @@ class RecipeStepInstructionState extends State<RecipeStepInstructionPage> {
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<RecipeStepInstructionPage> {
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){

View file

@ -153,7 +153,7 @@ class RecipesPageState extends State<RecipesPage> {
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<RecipesPage> {
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<RecipesPage> {
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>(PizzaRecipe.hiveName);
pizzaRecipeBox.add(pizzaRecipe);

View file

@ -44,7 +44,6 @@ Future<List<PizzaRecipe>> getRecipesFromGithub() async {
returnRecipeList.add(await PizzaRecipe.fromParsedYaml(recipe as YamlMap));
}
return returnRecipeList;
return const [];
}
Future<String> loadAsset(String path) async {

View file

@ -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