diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index b40cdf6..63a0c1a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -11,32 +11,38 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- target: [Android, Windows, Linux]
+ target: [Android, PlayStore, Windows, Linux]
include:
- - os: windows-2019
+ - os: windows-latest
target: Windows
build_target: windows
- build_path: build\windows\runner\Release
+ build_path: build\windows\x64\runner\Release
asset_extension: .zip
asset_content_type: application/zip
- - os: ubuntu-20.04
+ - os: ubuntu-latest
target: Linux
build_target: linux
build_path: build/linux/x64/release/bundle
asset_extension: .tar.gz
asset_content_type: application/gzip
- - os: ubuntu-20.04
+ - os: ubuntu-latest
target: Android
build_target: apk
build_path: build/app/outputs/flutter-apk
asset_extension: .apk
asset_content_type: application/vnd.android.package-archive
+ - os: ubuntu-latest
+ target: PlayStore
+ build_target: aab
+ build_path: build/app/outputs/bundle/release
+ asset_extension: .aab
+ asset_content_type: application/x-authorware-bin
# Disable fail-fast as we want results from all even if one fails.
fail-fast: false
steps:
# Set up Flutter.
- name: Clone Flutter repository with master channel
- uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
+ uses: subosito/flutter-action@v2
with:
channel: master
@@ -46,12 +52,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev
- name: Install Android dependencies
- if: matrix.target == 'Android'
- uses: actions/setup-java@v1
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
+ uses: actions/setup-java@v4
with:
- java-version: '12.x'
+ distribution: 'temurin'
+ java-version: '21'
- name: Enable desktop support
- if: matrix.target != 'Android'
+ if: matrix.target != 'Android' && matrix.target != 'PlayStore'
run: |
flutter config --enable-linux-desktop
flutter config --enable-macos-desktop
@@ -61,11 +68,11 @@ jobs:
# Checkout NSSL code, recreate missing files, and get packages.
- name: Checkout NSSL code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- run: flutter create . --project-name nssl --org de.susch19
- run: flutter pub get
- name: Configure Keystore for Android
- if: matrix.target == 'Android'
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
run: |
echo "$KEY_STORE_FILE" | base64 --decode > app/nssl-keystore.jks
echo "storeFile=nssl-keystore.jks" >> key.properties
@@ -119,22 +126,22 @@ jobs:
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .
- - name: Rename build for Android
- if: matrix.target == 'Android'
- run: mv app-release.apk $GITHUB_WORKSPACE/nssl_${{ matrix.target }}.apk
+ - name: Rename build for ${{ matrix.target }}
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
+ run: mv app-release${{ matrix.asset_extension }} $GITHUB_WORKSPACE/nssl_${{ matrix.target }}${{ matrix.asset_extension }}
working-directory: ${{ matrix.build_path }}
- name: Compress build for Linux
if: matrix.target == 'Linux'
- run: tar czf $GITHUB_WORKSPACE/nssl_${{ matrix.target }}.tar.gz *
+ run: tar czf $GITHUB_WORKSPACE/nssl_${{ matrix.target }}${{ matrix.asset_extension }} *
working-directory: ${{ matrix.build_path }}
- name: Compress build for Windows
if: matrix.target == 'Windows'
- run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\nssl_${{ matrix.target }}.zip
+ run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\nssl_${{ matrix.target }}${{ matrix.asset_extension }}
working-directory: ${{ matrix.build_path }}
# Upload the build.
- name: Add build into artifacts
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: nssl_${{ matrix.target }}${{ matrix.asset_extension }}
path: ./nssl_${{ matrix.target }}${{ matrix.asset_extension }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b9e5162..8e7d709 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -25,7 +25,7 @@ jobs:
future_release: ${{ github.ref }}
#since_tag: ${{ steps.get_latest_release.outputs.release }}
- name: Upload changelog
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: changelog
path: CHANGELOG.md
@@ -39,7 +39,7 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Download changelog
- uses: actions/download-artifact@v2
+ uses: actions/download-artifact@v4
with:
name: changelog
- name: Draft release with changelog
@@ -60,33 +60,39 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- target: [Android, Windows, Linux]
+ target: [Android, PlayStore, Windows, Linux]
include:
- - os: windows-2019
+ - os: windows-latest
target: Windows
build_target: windows
- build_path: build\windows\runner\Release
+ build_path: build\windows\x64\runner\Release
asset_extension: .zip
asset_content_type: application/zip
- - os: ubuntu-20.04
+ - os: ubuntu-latest
target: Linux
build_target: linux
build_path: build/linux/x64/release/bundle
asset_extension: .tar.gz
asset_content_type: application/gzip
- - os: ubuntu-20.04
+ - os: ubuntu-latest
target: Android
build_target: apk
build_path: build/app/outputs/flutter-apk
asset_extension: .apk
asset_content_type: application/vnd.android.package-archive
+ - os: ubuntu-latest
+ target: PlayStore
+ build_target: aab
+ build_path: build/app/outputs/bundle/release
+ asset_extension: .aab
+ asset_content_type: application/x-authorware-bin
# Disable fail-fast as we want results from all even if one fails.
fail-fast: false
needs: draft-release
steps:
# Set up Flutter.
- name: Clone Flutter repository with master channel
- uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
+ uses: subosito/flutter-action@v2
with:
channel: master
@@ -96,12 +102,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev
- name: Install Android dependencies
- if: matrix.target == 'Android'
- uses: actions/setup-java@v1
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
+ uses: actions/setup-java@v4
with:
- java-version: '12.x'
+ distribution: 'temurin'
+ java-version: '21'
- name: Enable desktop support
- if: matrix.target != 'Android'
+ if: matrix.target != 'Android' && matrix.target != 'PlayStore'
run: |
flutter config --enable-linux-desktop
flutter config --enable-macos-desktop
@@ -111,11 +118,11 @@ jobs:
# Checkout NSSL code, recreate missing files, and get packages.
- name: Checkout NSSL code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- run: flutter create . --project-name nssl --org de.susch19
- run: flutter pub get
- name: Configure Keystore for Android
- if: matrix.target == 'Android'
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
run: |
echo "$KEY_STORE_FILE" | base64 --decode > app/nssl-keystore.jks
echo "storeFile=nssl-keystore.jks" >> key.properties
@@ -169,9 +176,9 @@ jobs:
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .
- - name: Rename build for Android
- if: matrix.target == 'Android'
- run: mv app-release.apk $GITHUB_WORKSPACE/nssl_${{ matrix.target }}.apk
+ - name: Rename build for ${{ matrix.target }}
+ if: matrix.target == 'Android' || matrix.target == 'PlayStore'
+ run: mv app-release${{ matrix.asset_extension }} $GITHUB_WORKSPACE/nssl_${{ matrix.target }}${{ matrix.asset_extension }}
working-directory: ${{ matrix.build_path }}
- name: Compress build for Linux
if: matrix.target == 'Linux'
@@ -179,7 +186,7 @@ jobs:
working-directory: ${{ matrix.build_path }}
- name: Compress build for Windows
if: matrix.target == 'Windows'
- run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\nssl_${{ matrix.target }}.zip
+ run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\nssl_${{ matrix.target }}${{ matrix.asset_extension }}
working-directory: ${{ matrix.build_path }}
# Upload the build.
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 4723113..29e3443 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,3 +1,9 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@@ -6,27 +12,34 @@ 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.")
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
}
-apply plugin: 'com.android.application'
-apply plugin: 'com.google.gms.google-services'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
- def keystoreProperties = new Properties()
- def keystorePropertiesFile = rootProject.file('key.properties')
- if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- }
+
+def keystoreProperties = new Properties()
+def keystorePropertiesFile = rootProject.file('key.properties')
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+}
android {
- compileSdkVersion 33
+ namespace "de.susch19.nssl"
+ compileSdk flutter.compileSdkVersion
- lintOptions {
- checkReleaseBuilds false // Add this
- disable 'InvalidPackage'
+ compileOptions {
+ coreLibraryDesugaringEnabled true
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
}
defaultConfig {
@@ -34,8 +47,14 @@ android {
applicationId 'de.susch19.nssl'
resValue "string", "app_name", "NSSL"
multiDexEnabled true
- minSdkVersion 21
- targetSdkVersion 33
+ minSdk 23
+ targetSdk flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
}
signingConfigs {
@@ -57,26 +76,13 @@ android {
resValue "string", "app_name", "NSSL Debug"
}
}
-
}
flutter {
source '../..'
}
+
dependencies {
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test:runner:1.2.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
-}
-//
-//configurations.all {
-// resolutionStrategy.eachDependency { DependencyResolveDetails details ->
-// def requested = details.requested
-// if (requested.group == 'com.android.support') {
-// if (!requested.name.startsWith("multidex")) {
-// details.useVersion '27.0.0'
-// }
-// }
-// }
-//}
+ coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
+}
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index aa52e33..bc157bd 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,37 +1,18 @@
-
-
-buildscript {
- ext.kotlin_version = '1.5.20'
+allprojects {
repositories {
google()
mavenCentral()
}
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.2.1'
- classpath 'com.google.gms:google-services:4.3.14'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-rootProject.allprojects {
- repositories {
- google()
- mavenCentral()
-}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
-
-
-ext{
-
-firebaseMessagingVersion = "21.1.0"
-}
\ No newline at end of file
diff --git a/android/gradle.properties b/android/gradle.properties
index 75e8721..1718492 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,4 +1,4 @@
android.enableJetifier=true
android.useAndroidX=true
android.enableR8=true
-org.gradle.jvmargs=-Xmx1536M
\ No newline at end of file
+org.gradle.jvmargs=-Xmx2048M
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
index 115da6c..78a20d7 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,15 +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 flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
-def plugins = new Properties()
-def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
-if (pluginsFile.exists()) {
- pluginsFile.withInputStream { stream -> plugins.load(stream) }
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
}
-plugins.each { name, path ->
- def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
- include ":$name"
- project(":$name").projectDir = pluginDirectory
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version "8.10.0" apply false
+ id "org.jetbrains.kotlin.android" version "2.1.20" apply false
}
+
+include ":app"
diff --git a/assets/vectors/nssl_icon.svg b/assets/vectors/nssl_icon.svg
index cdb5f3d..bb5b5ce 100644
--- a/assets/vectors/nssl_icon.svg
+++ b/assets/vectors/nssl_icon.svg
@@ -1,65 +1,34 @@
-
+ C369.778,393.076,364.632,398.222,358.284,398.222z" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ios/Flutter/ephemeral/flutter_lldb_helper.py b/ios/Flutter/ephemeral/flutter_lldb_helper.py
new file mode 100644
index 0000000..a88caf9
--- /dev/null
+++ b/ios/Flutter/ephemeral/flutter_lldb_helper.py
@@ -0,0 +1,32 @@
+#
+# Generated file, do not edit.
+#
+
+import lldb
+
+def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
+ """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
+ base = frame.register["x0"].GetValueAsAddress()
+ page_len = frame.register["x1"].GetValueAsUnsigned()
+
+ # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
+ # first page to see if handled it correctly. This makes diagnosing
+ # misconfiguration (e.g. missing breakpoint) easier.
+ data = bytearray(page_len)
+ data[0:8] = b'IHELPED!'
+
+ error = lldb.SBError()
+ frame.GetThread().GetProcess().WriteMemory(base, data, error)
+ if not error.Success():
+ print(f'Failed to write into {base}[+{page_len}]', error)
+ return
+
+def __lldb_init_module(debugger: lldb.SBDebugger, _):
+ target = debugger.GetDummyTarget()
+ # Caveat: must use BreakpointCreateByRegEx here and not
+ # BreakpointCreateByName. For some reasons callback function does not
+ # get carried over from dummy target for the later.
+ bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
+ bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
+ bp.SetAutoContinue(True)
+ print("-- LLDB integration loaded --")
diff --git a/ios/Flutter/ephemeral/flutter_lldbinit b/ios/Flutter/ephemeral/flutter_lldbinit
new file mode 100644
index 0000000..e3ba6fb
--- /dev/null
+++ b/ios/Flutter/ephemeral/flutter_lldbinit
@@ -0,0 +1,5 @@
+#
+# Generated file, do not edit.
+#
+
+command script import --relative-to-command-file flutter_lldb_helper.py
diff --git a/lib/firebase/cloud_messsaging.dart b/lib/firebase/cloud_messsaging.dart
index d207c89..ef11434 100644
--- a/lib/firebase/cloud_messsaging.dart
+++ b/lib/firebase/cloud_messsaging.dart
@@ -1,45 +1,57 @@
import 'dart:async';
import 'dart:convert';
-import 'dart:io';
import 'package:firebase_messaging/firebase_messaging.dart';
-import 'package:flutter/foundation.dart';
import 'package:nssl/helper/iterable_extensions.dart';
import 'package:nssl/manager/startup_manager.dart';
import 'package:nssl/models/model_export.dart';
+import 'package:nssl/server_communication/helper_methods.dart';
import 'package:riverpod/riverpod.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
-FirebaseMessaging? get firebaseMessaging => Startup.firebaseSupported() ? FirebaseMessaging.instance : null;
+part 'cloud_messsaging.g.dart';
-final cloudMessagingProvider = Provider((ref) {
- return CloudMessaging(ref);
-});
+FirebaseMessaging? get firebaseMessaging =>
+ Startup.firebaseSupported() ? FirebaseMessaging.instance : null;
-class CloudMessaging {
- static late Ref _ref;
-
- CloudMessaging(Ref ref) {
- _ref = ref;
+@Riverpod(keepAlive: true)
+class CloudMessaging extends _$CloudMessaging {
+ @override
+ void build() {
+ return;
}
- static Future onMessage(RemoteMessage message) async {
+ Future onMessage(RemoteMessage message) async {
final dynamic data = message.data;
+ final deviceToken = data["deviceToken"];
+ if (deviceToken != null && deviceToken == HelperMethods.deviceToken) return;
int listId = int.parse(data["listId"]);
- var ownId = _ref.read(userIdProvider);
- if (ownId == int.parse(data["userId"])) {
+ var ownId = ref.read(userIdProvider);
+ if (deviceToken == null && ownId == int.parse(data["userId"])) {
return null;
}
- var listController = _ref.read(shoppingListsProvider);
+ var listController = ref.read(shoppingListsProvider);
- var list = listController.shoppingLists.firstOrNull((element) => element.id == listId);
+ var list = listController.shoppingLists.firstOrNull(
+ (element) => element.id == listId,
+ );
if (list == null) {
var mapp = jsonDecode(data["items"]);
//User was added to new list
- var items = _ref.watch(shoppingItemsProvider.notifier);
+ var items = ref.watch(shoppingItemsProvider.notifier);
var newState = items.state.toList();
- newState
- .addAll(mapp.map((x) => ShoppingItem(x["name"], listId, x["sortOrder"], id: x["id"], amount: x["amount"])));
+ newState.addAll(
+ mapp.map(
+ (x) => ShoppingItem(
+ x["name"],
+ listId,
+ x["sortOrder"],
+ id: x["id"],
+ amount: x["amount"],
+ ),
+ ),
+ );
items.state = newState;
listController.addList(ShoppingList(listId, data["name"]));
} else if (data.length == 1) {
@@ -51,7 +63,7 @@ class CloudMessaging {
switch (action) {
case "ItemChanged": //Id, Amount, action
var id = int.parse(data["id"]);
- var items = _ref.watch(shoppingItemsProvider.notifier);
+ var items = ref.watch(shoppingItemsProvider.notifier);
var newState = items.state.toList();
var item = newState.firstWhere((x) => x.id == id);
newState.remove(item);
@@ -65,13 +77,20 @@ class CloudMessaging {
break;
case "NewItemAdded": //Id, Name, Gtin, Amount, action
var newItemId = int.parse(data["id"]);
- var existing = _ref.read(shoppingItemProvider.create(newItemId));
+ var existing = ref.read(shoppingItemProvider(newItemId));
if (existing != null) break;
listController.addSingleItem(
- list,
- ShoppingItem(data["name"], list.id, int.parse(data["sortOrder"]),
- id: int.parse(data["id"]), amount: int.parse(data["amount"]), crossedOut: false));
+ list,
+ ShoppingItem(
+ data["name"],
+ list.id,
+ int.parse(data["sortOrder"]),
+ id: int.parse(data["id"]),
+ amount: int.parse(data["amount"]),
+ crossedOut: false,
+ ),
+ );
break;
case "ListRename": //Name, action
listController.rename(list.id, data["name"] as String);
@@ -81,26 +100,26 @@ class CloudMessaging {
break;
case "ItemRenamed": //product.Id, product.Name
var itemId = int.parse(data["id"]);
- var items = _ref.watch(shoppingItemsProvider.notifier);
+ var items = ref.watch(shoppingItemsProvider.notifier);
var newState = items.state.toList();
var item = newState.firstWhere((x) => x.id == itemId);
newState.remove(item);
- newState.add(
- item.cloneWith(newName: data["name"]),
- );
+ newState.add(item.cloneWith(newName: data["name"]));
items.state = newState;
listController.save(list);
break;
case "OrderChanged":
var itemId = int.parse(data["id"]);
- var items = _ref.watch(shoppingItemsProvider.notifier);
+ var items = ref.watch(shoppingItemsProvider.notifier);
var newState = items.state.toList();
var item = newState.firstWhere((x) => x.id == itemId);
newState.remove(item);
- newState.add(item.cloneWith(
- newAmount: int.parse(data["amount"]),
- newSortOrder: int.parse(data["sortOrder"]),
- ));
+ newState.add(
+ item.cloneWith(
+ newAmount: int.parse(data["amount"]),
+ newSortOrder: int.parse(data["sortOrder"]),
+ ),
+ );
items.state = newState;
listController.save(list);
break;
diff --git a/lib/firebase/cloud_messsaging.g.dart b/lib/firebase/cloud_messsaging.g.dart
new file mode 100644
index 0000000..4abda6b
--- /dev/null
+++ b/lib/firebase/cloud_messsaging.g.dart
@@ -0,0 +1,63 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'cloud_messsaging.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+@ProviderFor(CloudMessaging)
+const cloudMessagingProvider = CloudMessagingProvider._();
+
+final class CloudMessagingProvider
+ extends $NotifierProvider {
+ const CloudMessagingProvider._()
+ : super(
+ from: null,
+ argument: null,
+ retry: null,
+ name: r'cloudMessagingProvider',
+ isAutoDispose: false,
+ dependencies: null,
+ $allTransitiveDependencies: null,
+ );
+
+ @override
+ String debugGetCreateSourceHash() => _$cloudMessagingHash();
+
+ @$internal
+ @override
+ CloudMessaging create() => CloudMessaging();
+
+ /// {@macro riverpod.override_with_value}
+ Override overrideWithValue(void value) {
+ return $ProviderOverride(
+ origin: this,
+ providerOverride: $SyncValueProvider(value),
+ );
+ }
+}
+
+String _$cloudMessagingHash() => r'e7b1ca03a469d2c91c63648330681342dfd39a86';
+
+abstract class _$CloudMessaging extends $Notifier {
+ void build();
+ @$mustCallSuper
+ @override
+ void runBuild() {
+ build();
+ final ref = this.ref as $Ref;
+ final element =
+ ref.element
+ as $ClassProviderElement<
+ AnyNotifier,
+ void,
+ Object?,
+ Object?
+ >;
+ element.handleValue(ref, null);
+ }
+}
+
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
diff --git a/lib/helper/iterable_extensions.dart b/lib/helper/iterable_extensions.dart
index ea5b6b9..fd589f7 100644
--- a/lib/helper/iterable_extensions.dart
+++ b/lib/helper/iterable_extensions.dart
@@ -1,16 +1,25 @@
extension Linq on List {
- bool removeElements(Iterable elements) {
+ bool sequenceEquals(final List other) {
+ if (other.length != length) return false;
+
+ for (var i = 0; i < length; i++) {
+ if (other[i] != this[i]) return false;
+ }
+ return true;
+ }
+
+ bool removeElements(final Iterable elements) {
bool b = true;
- for (var e in elements) {
+ for (final e in elements) {
if (!b) return b;
- b = this.remove(e);
+ b = remove(e);
}
return b;
}
List copy() {
- List items = [];
- this.forEach((element) {
+ final List items = [];
+ forEach((final element) {
items.add(element);
});
return items;
@@ -18,7 +27,7 @@ extension Linq on List {
}
extension MoreMath on double {
- double clamp(double lower, double maximum) {
+ double clamp(final double lower, final double maximum) {
if (this <= lower) return lower;
if (this >= maximum) return maximum;
return this;
@@ -26,17 +35,17 @@ extension MoreMath on double {
}
extension Maps on Map {
- List select(T Function(K, E) keyFunction) {
- var retList = [];
- for (var entry in this.entries) {
+ List select(final T Function(K, E) keyFunction) {
+ final retList = [];
+ for (final entry in entries) {
retList.add(keyFunction(entry.key, entry.value));
}
return retList;
}
- MapEntry? elementAt(int index, {MapEntry? orElse}) {
+ MapEntry? elementAt(final int index, {final MapEntry? orElse}) {
int i = 0;
- for (var el in this.entries) {
+ for (final el in entries) {
if (index == i) return el;
i++;
}
@@ -44,66 +53,120 @@ extension Maps on Map {
}
}
+extension StringShortcuts on String {
+ String substringReverse(final int end, {final int start = 0}) {
+ return substring(start, length - start - end);
+ }
+}
+
extension Iterables on Iterable {
- Map> groupBy(K Function(E) keyFunction) => fold(
- >{},
- (Map> map, E element) =>
- map..putIfAbsent(keyFunction(element), () => []).add(element));
-
- Map> groupManyBy(List Function(E) keyFunction) =>
- fold(>{}, (Map> map, E element) {
- for (var r in keyFunction(element)) {
- map..putIfAbsent(r, () => []).add(element);
+ Iterable mapMany(final Iterable Function(E) func) sync* {
+ for (final e in this) {
+ for (final ret in func(e)) {
+ yield ret;
+ }
+ }
+ }
+
+ Iterable distinct() {
+ final list = [];
+ for (final e in this) {
+ if (!list.any((final element) => element == e)) list.add(e);
+ }
+ return list;
+ }
+
+ Map> groupBy(final K Function(E) keyFunction) => fold(>{},
+ (final Map> map, final E element) => map..putIfAbsent(keyFunction(element), () => []).add(element));
+
+ Map> groupManyBy(final List Function(E) keyFunction) =>
+ fold(>{}, (final Map> map, final E element) {
+ for (final r in keyFunction(element)) {
+ map.putIfAbsent(r, () => []).add(element);
}
return map;
});
- E? firstOrNull(bool Function(E element) keyFunction) {
- for (var item in [...this]) {
+ E? firstOrNull(final bool Function(E element) keyFunction) {
+ for (final item in this) {
if (keyFunction(item)) return item;
}
return null;
}
- Iterable injectForIndex(E? Function(int index) indexFunc) sync* {
+ Iterable injectForIndex(final E? Function(int index) indexFunc) sync* {
int index = 0;
- for (var item in [...this]) {
- var res = indexFunc(index);
+ for (final item in [...this]) {
+ final res = indexFunc(index);
if (res != null) yield res;
yield item;
index++;
}
}
- int sum(int Function(E element) keyFunction) {
+ int sum(final int Function(E element) keyFunction) {
int sum = 0;
- for (var item in [...this]) {
+ for (final item in [...this]) {
sum += keyFunction(item);
}
return sum;
}
- int bitOr(int Function(E element) keyFunction) {
+ int bitOr(final int Function(E element) keyFunction) {
int sum = 0;
- for (var item in [...this]) {
+ for (final item in [...this]) {
sum |= keyFunction(item);
}
return sum;
}
- int bitAnd(int Function(E element) keyFunction) {
+ int bitAnd(final int Function(E element) keyFunction) {
int sum = 0;
- for (var item in [...this]) {
+ for (final item in [...this]) {
sum &= keyFunction(item);
}
return sum;
}
- int bitXor(int Function(E element) keyFunction) {
+ int bitXor(final int Function(E element) keyFunction) {
int sum = 0;
- for (var item in [...this]) {
+ for (final item in [...this]) {
sum ^= keyFunction(item);
}
return sum;
}
+
+ Map toMap(
+ final TKey Function(E element) keyFunction, final TValue Function(E element) valueFunction) {
+ final map = {};
+ for (final item in [...this]) {
+ map[keyFunction(item)] = valueFunction(item);
+ }
+ return map;
+ }
+
+ num minBy(final num initial, final num Function(E element) func) {
+ num min = initial;
+ for (final item in [...this]) {
+ final ret = func(item);
+ if (ret < min) min = ret;
+ }
+ return min;
+ }
+
+ num maxBy(final num initial, final num Function(E element) func) {
+ num max = initial;
+ for (final item in [...this]) {
+ final ret = func(item);
+ if (ret > max) max = ret;
+ }
+ return max;
+ }
+
+ bool all(final bool Function(E element) func) {
+ for (final item in [...this]) {
+ if (!func(item)) return false;
+ }
+ return true;
+ }
}
diff --git a/lib/localization/nssl_messages_de.dart b/lib/localization/nssl_messages_de.dart
index 2c990f3..5b05bd4 100644
--- a/lib/localization/nssl_messages_de.dart
+++ b/lib/localization/nssl_messages_de.dart
@@ -5,181 +5,275 @@ final messages = MessageLookup();
class MessageLookup extends MessageLookupByLibrary {
get localeName => 'de';
- final Map messages = _notInlinedMessages(_notInlinedMessages);
+ final Map messages =
+ _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => {
"options": MessageLookupByLibrary.simpleMessage("Optionen"),
"changeTheme": MessageLookupByLibrary.simpleMessage("Design ändern"),
"scanPB": MessageLookupByLibrary.simpleMessage("SCANNEN"),
- "addPB": MessageLookupByLibrary.simpleMessage("ADD"), //TODO find good german word
+ "addPB": MessageLookupByLibrary.simpleMessage(
+ "ADD"), //TODO find good german word
"searchPB": MessageLookupByLibrary.simpleMessage("SUCHEN"),
- "deleteCrossedOutPB": MessageLookupByLibrary.simpleMessage("Lösche Markierte"),
+ "deleteCrossedOutPB":
+ MessageLookupByLibrary.simpleMessage("Lösche Markierte"),
"addListPB": MessageLookupByLibrary.simpleMessage("LISTE HINZUFÜGEN"),
"contributors": MessageLookupByLibrary.simpleMessage("Teilnehmer"),
"rename": MessageLookupByLibrary.simpleMessage("Umbenennen"),
"remove": MessageLookupByLibrary.simpleMessage("Entfernen"),
- "addProduct": MessageLookupByLibrary.simpleMessage("Artikel hinzufügen"),
- "addProductWithoutSearch": MessageLookupByLibrary.simpleMessage("Name des Artikels"),
+ "addProduct":
+ MessageLookupByLibrary.simpleMessage("Artikel hinzufügen"),
+ "addProductWithoutSearch":
+ MessageLookupByLibrary.simpleMessage("Name des Artikels"),
"productName": MessageLookupByLibrary.simpleMessage("Artikelname"),
- "messageDeleteAllCrossedOut":
- MessageLookupByLibrary.simpleMessage("Alle durchgestrichenen Artikel wurden gelöscht"),
+ "messageDeleteAllCrossedOut": MessageLookupByLibrary.simpleMessage(
+ "Alle durchgestrichenen Artikel wurden gelöscht"),
"undo": MessageLookupByLibrary.simpleMessage("RÜCKG."),
- "removedShoppingListMessage": MessageLookupByLibrary.simpleMessage(" entfernt "), //\${User.shoppingLists}
- "noListsInDrawerMessage": MessageLookupByLibrary.simpleMessage(" Hier werden deine Listen angezeigt"),
- "notLoggedInYet": MessageLookupByLibrary.simpleMessage("Noch nicht eingeloggt"),
- "newNameOfListHint": MessageLookupByLibrary.simpleMessage("Neuer Listenname"),
+ "removedShoppingListMessage": MessageLookupByLibrary.simpleMessage(
+ " entfernt "), //\${User.shoppingLists}
+ "noListsInDrawerMessage": MessageLookupByLibrary.simpleMessage(
+ " Hier werden deine Listen angezeigt"),
+ "notLoggedInYet":
+ MessageLookupByLibrary.simpleMessage("Noch nicht eingeloggt"),
+ "newNameOfListHint":
+ MessageLookupByLibrary.simpleMessage("Neuer Listenname"),
"listName": MessageLookupByLibrary.simpleMessage("Listenname"),
- "renameListTitle": MessageLookupByLibrary.simpleMessage("Liste umbenennen"),
- "renameListHint": MessageLookupByLibrary.simpleMessage("Der neue Name der Liste"),
- "chooseListToAddTitle": MessageLookupByLibrary.simpleMessage("Welche Liste hinzufügen?"),
- "addNewListTitle": MessageLookupByLibrary.simpleMessage("Füge eine neue Liste hinzu"),
- "recipeCreateError": MessageLookupByLibrary.simpleMessage("Konnte Rezept nicht erstellen"),
- "recipeFromShareTitle": MessageLookupByLibrary.simpleMessage("Zu welcher Liste hinzufügen?"),
+ "renameListTitle":
+ MessageLookupByLibrary.simpleMessage("Liste umbenennen"),
+ "renameListHint":
+ MessageLookupByLibrary.simpleMessage("Der neue Name der Liste"),
+ "chooseListToAddTitle":
+ MessageLookupByLibrary.simpleMessage("Welche Liste hinzufügen?"),
+ "addNewListTitle":
+ MessageLookupByLibrary.simpleMessage("Füge eine neue Liste hinzu"),
+ "recipeCreateError": MessageLookupByLibrary.simpleMessage(
+ "Konnte Rezept nicht erstellen"),
+ "recipeFromShareTitle": MessageLookupByLibrary.simpleMessage(
+ "Zu welcher Liste hinzufügen?"),
"recipeFromShareNew": MessageLookupByLibrary.simpleMessage("NEU"),
"recipeName": MessageLookupByLibrary.simpleMessage("Rezept"),
- "recipeNameHint": MessageLookupByLibrary.simpleMessage("Rezept ID oder URL"),
- "addNewRecipeTitle": MessageLookupByLibrary.simpleMessage("Neues Rezept hinzufügen"),
- "importNewRecipe": MessageLookupByLibrary.simpleMessage("Rezept importieren"),
- "importNewRecipeTitle": MessageLookupByLibrary.simpleMessage("Neues Rezept importieren"),
- "chooseAddListDialog": MessageLookupByLibrary.simpleMessage("Einkaufen"),
- "chooseAddRecipeDialog": MessageLookupByLibrary.simpleMessage("Chefkoch"),
- "youHaveActionItemMessage": MessageLookupByLibrary.simpleMessage('Du hast '), //\$action \$item
+ "recipeNameHint":
+ MessageLookupByLibrary.simpleMessage("Rezept ID oder URL"),
+ "addNewRecipeTitle":
+ MessageLookupByLibrary.simpleMessage("Neues Rezept hinzufügen"),
+ "importNewRecipe":
+ MessageLookupByLibrary.simpleMessage("Rezept importieren"),
+ "importNewRecipeTitle":
+ MessageLookupByLibrary.simpleMessage("Neues Rezept importieren"),
+ "chooseAddListDialog":
+ MessageLookupByLibrary.simpleMessage("Einkaufsliste"),
+ "chooseAddRecipeDialog":
+ MessageLookupByLibrary.simpleMessage("Chefkoch Rezept"),
+ "youHaveActionItemMessage":
+ MessageLookupByLibrary.simpleMessage('Du hast '), //\$action \$item
"archived": MessageLookupByLibrary.simpleMessage('archiviert'),
"deleted": MessageLookupByLibrary.simpleMessage('gelöscht'),
- "actionsForMessage": MessageLookupByLibrary.simpleMessage("archiviert" "gelöscht"),
- "youHaveActionNameMessage": MessageLookupByLibrary.simpleMessage("Du hast "), //\${s.name} \$action
+ "actionsForMessage":
+ MessageLookupByLibrary.simpleMessage("archiviert" "gelöscht"),
+ "youHaveActionNameMessage": MessageLookupByLibrary.simpleMessage(
+ "Du hast "), //\${s.name} \$action
"demoteMenu": MessageLookupByLibrary.simpleMessage("Degradieren"),
"promoteMenu": MessageLookupByLibrary.simpleMessage("Befördern"),
"contributorUser": MessageLookupByLibrary.simpleMessage(" - User"),
"contributorAdmin": MessageLookupByLibrary.simpleMessage(" - Admin"),
- "genericErrorMessageSnackbar":
- MessageLookupByLibrary.simpleMessage("Etwas Unerwartetes ist passiert!\n "), //\${z.error}
- "nameOfNewContributorHint": MessageLookupByLibrary.simpleMessage("Name des neuen Teilnehmers"),
- "wasRemovedSuccessfullyMessage": MessageLookupByLibrary.simpleMessage(" wurde erfolgreich gelöscht"),
- "loginSuccessfullMessage": MessageLookupByLibrary.simpleMessage("Login erfolgreich, die Listen werden geladen"),
- "nameEmailRequiredError": MessageLookupByLibrary.simpleMessage("Name oder EMail wird benötigt."),
- "usernameToShortError":
- MessageLookupByLibrary.simpleMessage("Der Benutzername muss aus mindestens 4 Zeichen bestehen"),
- "emailRequiredError": MessageLookupByLibrary.simpleMessage("EMail ist erforderlich"),
- "emailIncorrectFormatError":
- MessageLookupByLibrary.simpleMessage("Die EMail-Adresse scheint ein falsches Format zu haben"),
- "chooseAPassword": MessageLookupByLibrary.simpleMessage("Bitte ein Passwort eingeben"),
+ "genericErrorMessageSnackbar": MessageLookupByLibrary.simpleMessage(
+ "Etwas Unerwartetes ist passiert!\n "), //\${z.error}
+ "nameOfNewContributorHint":
+ MessageLookupByLibrary.simpleMessage("Name des neuen Teilnehmers"),
+ "wasRemovedSuccessfullyMessage":
+ MessageLookupByLibrary.simpleMessage(" wurde erfolgreich gelöscht"),
+ "loginSuccessfullMessage": MessageLookupByLibrary.simpleMessage(
+ "Login erfolgreich, die Listen werden geladen"),
+ "nameEmailRequiredError": MessageLookupByLibrary.simpleMessage(
+ "Name oder EMail wird benötigt."),
+ "usernameToShortError": MessageLookupByLibrary.simpleMessage(
+ "Der Benutzername muss aus mindestens 4 Zeichen bestehen"),
+ "emailRequiredError":
+ MessageLookupByLibrary.simpleMessage("EMail ist erforderlich"),
+ "emailIncorrectFormatError": MessageLookupByLibrary.simpleMessage(
+ "Die EMail-Adresse scheint ein falsches Format zu haben"),
+ "chooseAPassword":
+ MessageLookupByLibrary.simpleMessage("Bitte ein Passwort eingeben"),
"login": MessageLookupByLibrary.simpleMessage("Login"),
- "usernameOrEmailForLoginHint":
- MessageLookupByLibrary.simpleMessage("Benutzername oder EMail kann für's einloggen genutzt werden"),
- "usernameOrEmailTitle": MessageLookupByLibrary.simpleMessage("Benutzername oder EMail"),
+ "usernameOrEmailForLoginHint": MessageLookupByLibrary.simpleMessage(
+ "Benutzername oder EMail kann für's einloggen genutzt werden"),
+ "usernameOrEmailTitle":
+ MessageLookupByLibrary.simpleMessage("Benutzername oder EMail"),
"emailTitle": MessageLookupByLibrary.simpleMessage('EMail'),
- "choosenPasswordHint": MessageLookupByLibrary.simpleMessage("Dein gewähltes Passwort"),
+ "choosenPasswordHint":
+ MessageLookupByLibrary.simpleMessage("Dein gewähltes Passwort"),
"password": MessageLookupByLibrary.simpleMessage("Passwort"),
"loginButton": MessageLookupByLibrary.simpleMessage("LOGIN"),
- "registerTextOnLogin":
- MessageLookupByLibrary.simpleMessage("Du hast noch keinen Account? Erstelle jetzt einen."),
- "usernameEmptyError": MessageLookupByLibrary.simpleMessage("Benutzername muss ausgefüllt sein"),
- "passwordEmptyError": MessageLookupByLibrary.simpleMessage("Passwort muss ausgefüllt sein"),
- "passwordTooShortError": MessageLookupByLibrary.simpleMessage("Passwort muss mindestens 6 Zeichen lang sein"),
+ "registerTextOnLogin": MessageLookupByLibrary.simpleMessage(
+ "Du hast noch keinen Account? Erstelle jetzt einen."),
+ "usernameEmptyError": MessageLookupByLibrary.simpleMessage(
+ "Benutzername muss ausgefüllt sein"),
+ "passwordEmptyError": MessageLookupByLibrary.simpleMessage(
+ "Passwort muss ausgefüllt sein"),
+ "passwordTooShortError": MessageLookupByLibrary.simpleMessage(
+ "Passwort muss mindestens 6 Zeichen lang sein"),
"passwordMissingCharactersError": MessageLookupByLibrary.simpleMessage(
"Passwort muss mindestens ein spezielles Zeichen (Kann jedes Symbol/Emoji sein) und Buchstabe oder Zahl enthalten"),
- "emailEmptyError": MessageLookupByLibrary.simpleMessage("EMail muss ausgefüllt sein"),
- "reenterPasswordError":
- MessageLookupByLibrary.simpleMessage("Die Passwörter stimmen nicht überein oder sind leer"),
- "unknownUsernameError": MessageLookupByLibrary.simpleMessage("Es stimmt etwas mit deinem Benutzername nicht"),
- "unknownEmailError": MessageLookupByLibrary.simpleMessage("Es stimmt etwas mit deiner EMail nicht"),
- "unknownPasswordError": MessageLookupByLibrary.simpleMessage("Es stimmt etwas mit deinem Passwort nicht"),
- "unknownReenterPasswordError":
- MessageLookupByLibrary.simpleMessage("Es stimmt etwas mit dem wiederholten Passwort nicht"),
- "registrationSuccessfulMessage": MessageLookupByLibrary.simpleMessage("Registrierung erfolgreich"),
- "registrationTitle": MessageLookupByLibrary.simpleMessage("Registrierung"),
- "nameEmptyError": MessageLookupByLibrary.simpleMessage("Name ist erforderlich"),
- "chooseAPasswordPrompt": MessageLookupByLibrary.simpleMessage("Bitte gib ein Passwort ein"),
- "reenterPasswordPrompt": MessageLookupByLibrary.simpleMessage("Bitte gib dein Passwort erneut ein"),
- "passwordsDontMatchError": MessageLookupByLibrary.simpleMessage("Die Passwörter stimmen nicht überein"),
- "usernameRegisterHint":
- MessageLookupByLibrary.simpleMessage("Kann zum einloggen und zum gefunden werden genutzt werden"),
+ "emailEmptyError":
+ MessageLookupByLibrary.simpleMessage("EMail muss ausgefüllt sein"),
+ "reenterPasswordError": MessageLookupByLibrary.simpleMessage(
+ "Die Passwörter stimmen nicht überein oder sind leer"),
+ "unknownUsernameError": MessageLookupByLibrary.simpleMessage(
+ "Es stimmt etwas mit deinem Benutzername nicht"),
+ "unknownEmailError": MessageLookupByLibrary.simpleMessage(
+ "Es stimmt etwas mit deiner EMail nicht"),
+ "unknownPasswordError": MessageLookupByLibrary.simpleMessage(
+ "Es stimmt etwas mit deinem Passwort nicht"),
+ "unknownReenterPasswordError": MessageLookupByLibrary.simpleMessage(
+ "Es stimmt etwas mit dem wiederholten Passwort nicht"),
+ "registrationSuccessfulMessage":
+ MessageLookupByLibrary.simpleMessage("Registrierung erfolgreich"),
+ "registrationTitle":
+ MessageLookupByLibrary.simpleMessage("Registrierung"),
+ "nameEmptyError":
+ MessageLookupByLibrary.simpleMessage("Name ist erforderlich"),
+ "chooseAPasswordPrompt":
+ MessageLookupByLibrary.simpleMessage("Bitte gib ein Passwort ein"),
+ "reenterPasswordPrompt": MessageLookupByLibrary.simpleMessage(
+ "Bitte gib dein Passwort erneut ein"),
+ "passwordsDontMatchError": MessageLookupByLibrary.simpleMessage(
+ "Die Passwörter stimmen nicht überein"),
+ "usernameRegisterHint": MessageLookupByLibrary.simpleMessage(
+ "Kann zum einloggen und zum gefunden werden genutzt werden"),
"username": MessageLookupByLibrary.simpleMessage("Benutzername"),
- "emailRegisterHint":
- MessageLookupByLibrary.simpleMessage("Kann zum einloggen und zum gefunden werden genutzt werden"),
- "passwordRegisterHint": MessageLookupByLibrary.simpleMessage("Das Passwort schützt deinen Account"),
- "retypePasswordHint":
- MessageLookupByLibrary.simpleMessage("Bitte wiederhole dein Passwort um Fehler zu vermeiden"),
- "retypePasswordTitle": MessageLookupByLibrary.simpleMessage("Passwortwiederholung"),
+ "emailRegisterHint": MessageLookupByLibrary.simpleMessage(
+ "Kann zum einloggen und zum gefunden werden genutzt werden"),
+ "passwordRegisterHint": MessageLookupByLibrary.simpleMessage(
+ "Das Passwort schützt deinen Account"),
+ "retypePasswordHint": MessageLookupByLibrary.simpleMessage(
+ "Bitte wiederhole dein Passwort um Fehler zu vermeiden"),
+ "retypePasswordTitle":
+ MessageLookupByLibrary.simpleMessage("Passwortwiederholung"),
"registerButton": MessageLookupByLibrary.simpleMessage("REGISTRIEREN"),
- "discardNewProduct": MessageLookupByLibrary.simpleMessage("Änderungen verwerfen?"),
+ "discardNewProduct":
+ MessageLookupByLibrary.simpleMessage("Änderungen verwerfen?"),
"cancelButton": MessageLookupByLibrary.simpleMessage("ABBRECHEN"),
"acceptButton": MessageLookupByLibrary.simpleMessage('ANNEHMEN'),
"discardButton": MessageLookupByLibrary.simpleMessage("VERWERFEN"),
- "fixErrorsBeforeSubmittingPrompt":
- MessageLookupByLibrary.simpleMessage("Bitte behebe die Fehler, gekennzeichnet in Rot"),
- "newProductTitle": MessageLookupByLibrary.simpleMessage("Neues Produkt"),
+ "fixErrorsBeforeSubmittingPrompt": MessageLookupByLibrary.simpleMessage(
+ "Bitte behebe die Fehler, gekennzeichnet in Rot"),
+ "newProductTitle":
+ MessageLookupByLibrary.simpleMessage("Neues Produkt"),
"saveButton": MessageLookupByLibrary.simpleMessage("SPEICHERN"),
"newProductName": MessageLookupByLibrary.simpleMessage("Produktname *"),
- "newProductNameHint": MessageLookupByLibrary.simpleMessage("Was steht auf der Verpackung?"),
- "newProductBrandName": MessageLookupByLibrary.simpleMessage("Markenname"),
- "newProductBrandNameHint": MessageLookupByLibrary.simpleMessage("Von welcher Marke ist das Produkt?"),
- "newProductWeight": MessageLookupByLibrary.simpleMessage("Menge mit Einheit"),
- "newProductWeightHint": MessageLookupByLibrary.simpleMessage("Zum Beispiel: 1,5l oder 100g"),
- "newProductAddToList": MessageLookupByLibrary.simpleMessage("Füge es der aktuellen Liste hinzu"),
- "newProductAddedToList": MessageLookupByLibrary.simpleMessage(" wurde hinzugefügt zur Liste "),
- "newProductStarExplanation": MessageLookupByLibrary.simpleMessage("* kennzeichnet die benötigten Felder"),
- "fieldRequiredError": MessageLookupByLibrary.simpleMessage("Dieses Feld wird benötigt!"),
- "newProductNameToShort": MessageLookupByLibrary.simpleMessage("Dieser Name scheint zu kurz zu sein"),
- "addedProduct": MessageLookupByLibrary.simpleMessage(' hinzugefügt'), //"\$name"
+ "newProductNameHint": MessageLookupByLibrary.simpleMessage(
+ "Was steht auf der Verpackung?"),
+ "newProductBrandName":
+ MessageLookupByLibrary.simpleMessage("Markenname"),
+ "newProductBrandNameHint": MessageLookupByLibrary.simpleMessage(
+ "Von welcher Marke ist das Produkt?"),
+ "newProductWeight":
+ MessageLookupByLibrary.simpleMessage("Menge mit Einheit"),
+ "newProductWeightHint": MessageLookupByLibrary.simpleMessage(
+ "Zum Beispiel: 1,5l oder 100g"),
+ "newProductAddToList": MessageLookupByLibrary.simpleMessage(
+ "Füge es der aktuellen Liste hinzu"),
+ "newProductAddedToList": MessageLookupByLibrary.simpleMessage(
+ " wurde hinzugefügt zur Liste "),
+ "newProductStarExplanation": MessageLookupByLibrary.simpleMessage(
+ "* kennzeichnet die benötigten Felder"),
+ "fieldRequiredError":
+ MessageLookupByLibrary.simpleMessage("Dieses Feld wird benötigt!"),
+ "newProductNameToShort": MessageLookupByLibrary.simpleMessage(
+ "Dieser Name scheint zu kurz zu sein"),
+ "addedProduct":
+ MessageLookupByLibrary.simpleMessage(' hinzugefügt'), //"\$name"
"productWasAlreadyInList": MessageLookupByLibrary.simpleMessage(
' ist bereits in der Liste. Die Menge wurde um 1 erhöht'), //"\$name" ist
- "searchProductHint": MessageLookupByLibrary.simpleMessage("Produktsuche"),
- "noMoreProductsMessage":
- MessageLookupByLibrary.simpleMessage("Es konnten keine weiteren Produkte mit dem Namen gefunden werden"),
+ "searchProductHint":
+ MessageLookupByLibrary.simpleMessage("Produktsuche"),
+ "noMoreProductsMessage": MessageLookupByLibrary.simpleMessage(
+ "Es konnten keine weiteren Produkte mit dem Namen gefunden werden"),
"codeText": MessageLookupByLibrary.simpleMessage("Code: "),
"removed": MessageLookupByLibrary.simpleMessage("entfernt"),
- "changePrimaryColor": MessageLookupByLibrary.simpleMessage("Hauptfarbe"),
- "changeAccentColor": MessageLookupByLibrary.simpleMessage("Akzentfarbe"),
- "changeDarkTheme": MessageLookupByLibrary.simpleMessage("Dunkles Design"),
- "changeAccentTextColor": MessageLookupByLibrary.simpleMessage("Helle Icons"),
+ "changePrimaryColor":
+ MessageLookupByLibrary.simpleMessage("Hauptfarbe"),
+ "changeAccentColor":
+ MessageLookupByLibrary.simpleMessage("Akzentfarbe"),
+ "changeDarkTheme":
+ MessageLookupByLibrary.simpleMessage("Dunkles Design"),
+ "changeAccentTextColor":
+ MessageLookupByLibrary.simpleMessage("Helle Icons"),
"autoSync": MessageLookupByLibrary.simpleMessage("Auto-Sync"),
- "changePasswordButton": MessageLookupByLibrary.simpleMessage("ÄNDERE PASSWORT"),
- "currentPassword": MessageLookupByLibrary.simpleMessage("Aktuelles Passwort"),
- "currentPasswordHint": MessageLookupByLibrary.simpleMessage("Das aktuelle Passwort, dass geändert werden soll"),
+ "changePasswordButton":
+ MessageLookupByLibrary.simpleMessage("ÄNDERE PASSWORT"),
+ "currentPassword":
+ MessageLookupByLibrary.simpleMessage("Aktuelles Passwort"),
+ "currentPasswordHint": MessageLookupByLibrary.simpleMessage(
+ "Das aktuelle Passwort, dass geändert werden soll"),
"newPassword": MessageLookupByLibrary.simpleMessage("Neues Passwort"),
- "newPasswordHint": MessageLookupByLibrary.simpleMessage("Das neu gewählte Passwort"),
- "repeatNewPassword": MessageLookupByLibrary.simpleMessage("Neues Passwort wiederholen"),
- "repeatNewPasswordHint": MessageLookupByLibrary.simpleMessage("Wiederholung des neu gewählten Passworts"),
- "changePasswordPD": MessageLookupByLibrary.simpleMessage("Ändere Passwort"),
+ "newPasswordHint":
+ MessageLookupByLibrary.simpleMessage("Das neu gewählte Passwort"),
+ "repeatNewPassword":
+ MessageLookupByLibrary.simpleMessage("Neues Passwort wiederholen"),
+ "repeatNewPasswordHint": MessageLookupByLibrary.simpleMessage(
+ "Wiederholung des neu gewählten Passworts"),
+ "changePasswordPD":
+ MessageLookupByLibrary.simpleMessage("Ändere Passwort"),
"successful": MessageLookupByLibrary.simpleMessage("Erfolgreich"),
- "passwordSet": MessageLookupByLibrary.simpleMessage("Dein Passwort wurde erfolgreich geändert"),
- "tokenExpired": MessageLookupByLibrary.simpleMessage("Token abgelaufen"),
+ "passwordSet": MessageLookupByLibrary.simpleMessage(
+ "Dein Passwort wurde erfolgreich geändert"),
+ "tokenExpired":
+ MessageLookupByLibrary.simpleMessage("Token abgelaufen"),
"tokenExpiredExplanation": MessageLookupByLibrary.simpleMessage(
"Der Token ist abgelaufen. Deshalb wird ein erneuter Login benötigt. Es handelt sich hierbei erst um ein Fehler, falls diese Meldung mehrmals im Monat aufkommt."),
- "noListLoaded": MessageLookupByLibrary.simpleMessage("Keine Liste geladen"),
- "renameListItem": MessageLookupByLibrary.simpleMessage("Produkt umbenennen"),
- "renameListItemHint": MessageLookupByLibrary.simpleMessage("Der neue Name des Produktes"),
- "renameListItemLabel": MessageLookupByLibrary.simpleMessage("Neuer Prdouktname"),
- "discardNewTheme": MessageLookupByLibrary.simpleMessage("Änderungen verwerfen?"),
- "forgotPassword": MessageLookupByLibrary.simpleMessage("Passwort vergessen?"),
- "bePatient": MessageLookupByLibrary.simpleMessage('Der Server bearbeitet diese Anfrage bereits'),
+ "noListLoaded":
+ MessageLookupByLibrary.simpleMessage("Keine Liste geladen"),
+ "renameListItem":
+ MessageLookupByLibrary.simpleMessage("Produkt umbenennen"),
+ "renameListItemHint":
+ MessageLookupByLibrary.simpleMessage("Der neue Name des Produktes"),
+ "renameListItemLabel":
+ MessageLookupByLibrary.simpleMessage("Neuer Prdouktname"),
+ "discardNewTheme":
+ MessageLookupByLibrary.simpleMessage("Änderungen verwerfen?"),
+ "forgotPassword":
+ MessageLookupByLibrary.simpleMessage("Passwort vergessen?"),
+ "bePatient": MessageLookupByLibrary.simpleMessage(
+ 'Der Server bearbeitet diese Anfrage bereits'),
"logout": MessageLookupByLibrary.simpleMessage('Ausloggen'),
- "deleteListTitle": MessageLookupByLibrary.simpleMessage('Lösche Liste '),
+ "deleteListTitle":
+ MessageLookupByLibrary.simpleMessage('Lösche Liste '),
"deleteListText": MessageLookupByLibrary.simpleMessage(
'Soll diese Liste wirklich gelöscht werden? Das kann NICHT rückgängig gemacht werden!'),
- "exportAsPdf": MessageLookupByLibrary.simpleMessage('Als PDF exportieren'),
+ "exportAsPdf":
+ MessageLookupByLibrary.simpleMessage('Als PDF exportieren'),
"boughtProducts": MessageLookupByLibrary.simpleMessage('Eingekauft'),
- "nothingBoughtYet": MessageLookupByLibrary.simpleMessage('Noch nichts eingekauft'),
+ "nothingBoughtYet":
+ MessageLookupByLibrary.simpleMessage('Noch nichts eingekauft'),
"reorderItems": MessageLookupByLibrary.simpleMessage('Reihenfolge'),
"refresh": MessageLookupByLibrary.simpleMessage('Aktualisieren'),
"okayButton": MessageLookupByLibrary.simpleMessage('OKAY'),
- "requestPasswordResetButton": MessageLookupByLibrary.simpleMessage("PASSWORT ZURÜCKSETZUNG BEANTRAGEN"),
- "requestPasswordResetTitle": MessageLookupByLibrary.simpleMessage("Passwort zurücksetzen"),
+ "requestPasswordResetButton": MessageLookupByLibrary.simpleMessage(
+ "PASSWORT ZURÜCKSETZUNG BEANTRAGEN"),
+ "requestPasswordResetTitle":
+ MessageLookupByLibrary.simpleMessage("Passwort zurücksetzen"),
"requestPasswordResetSuccess": MessageLookupByLibrary.simpleMessage(
'Die Passwort zurücksetzen Email wurde erfolgreich an die Adresse gesendet, sollte diese existieren. Weitere Schritte für das abschließen des Resets sind in der Email enthalten.'),
"settings": MessageLookupByLibrary.simpleMessage('Einstellungen'),
"about": MessageLookupByLibrary.simpleMessage('Über'),
- "codeOnGithub": MessageLookupByLibrary.simpleMessage('Schau doch mal in den Code auf GitHub rein'),
- "playstoreEntry": MessageLookupByLibrary.simpleMessage('Play Store Eintrag'),
- "iconSource": MessageLookupByLibrary.simpleMessage('Wer hat dieses schicke Icon gemacht? Finde es heraus!'),
- "scanditCredit":
- MessageLookupByLibrary.simpleMessage('hat diesen super Scanner in der App zur Verfügung gestellt'),
+ "codeOnGithub": MessageLookupByLibrary.simpleMessage(
+ 'Schau doch mal in den Code auf GitHub rein'),
+ "playstoreEntry":
+ MessageLookupByLibrary.simpleMessage('Play Store Eintrag'),
+ "iconSource": MessageLookupByLibrary.simpleMessage(
+ 'Wer hat dieses schicke Icon gemacht? Finde es heraus!'),
+ "scanditCredit": MessageLookupByLibrary.simpleMessage(
+ 'hat diesen super Scanner in der App zur Verfügung gestellt'),
"aboutText": MessageLookupByLibrary.simpleMessage(
'In jahrelanger Handarbeit geschmiedet mit dem einzigen Ziel, die Einkaufsplanung mit anderen zu vereinfachen und dabei seine Lieblingsprodukte blitzschnell per Kamera zu erfassen.'),
- "freeText": MessageLookupByLibrary.simpleMessage('Kostenlos, Werbefrei, für immer!'),
+ "freeText": MessageLookupByLibrary.simpleMessage(
+ 'Kostenlos, Werbefrei, für immer!'),
"questionsErrors": MessageLookupByLibrary.simpleMessage(
'Bei Fragen, Anregungen, Fehlern oder sonstigen Belangen kann jederzeit auf GitHub vorbeigeschaut werden, um ein Issue zu eröffnen.'),
+ "useMaterial3": MessageLookupByLibrary.simpleMessage(
+ 'Aktiviere Material Design 3 (Farben basierend auf Android Einstellungen)'),
+ "elevateAppBar":
+ MessageLookupByLibrary.simpleMessage('Hebe Titel farblich hervor'),
};
}
diff --git a/lib/localization/nssl_messages_en.dart b/lib/localization/nssl_messages_en.dart
index 5c6cd0e..50c7e5c 100644
--- a/lib/localization/nssl_messages_en.dart
+++ b/lib/localization/nssl_messages_en.dart
@@ -5,162 +5,249 @@ final messages = MessageLookup();
class MessageLookup extends MessageLookupByLibrary {
get localeName => 'en';
- final Map messages = _notInlinedMessages(_notInlinedMessages);
+ final Map messages =
+ _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => {
"options": MessageLookupByLibrary.simpleMessage("Options"),
"changeTheme": MessageLookupByLibrary.simpleMessage("Change Theme"),
"scanPB": MessageLookupByLibrary.simpleMessage("SCAN"),
"addPB": MessageLookupByLibrary.simpleMessage("ADD"),
"searchPB": MessageLookupByLibrary.simpleMessage("SEARCH"),
- "deleteCrossedOutPB": MessageLookupByLibrary.simpleMessage("Delete crossed out"),
+ "deleteCrossedOutPB":
+ MessageLookupByLibrary.simpleMessage("Delete crossed out"),
"addListPB": MessageLookupByLibrary.simpleMessage("ADD LIST"),
"contributors": MessageLookupByLibrary.simpleMessage("Contributors"),
"rename": MessageLookupByLibrary.simpleMessage("Rename"),
"remove": MessageLookupByLibrary.simpleMessage("Remove"),
"addProduct": MessageLookupByLibrary.simpleMessage('Add Product'),
- "addProductWithoutSearch":
- MessageLookupByLibrary.simpleMessage('Insert the name of the product, without searching in the database'),
+ "addProductWithoutSearch": MessageLookupByLibrary.simpleMessage(
+ 'Insert the name of the product, without searching in the database'),
"productName": MessageLookupByLibrary.simpleMessage('product name'),
- "messageDeleteAllCrossedOut": MessageLookupByLibrary.simpleMessage("You have deleted all crossed out items"),
+ "messageDeleteAllCrossedOut": MessageLookupByLibrary.simpleMessage(
+ "You have deleted all crossed out items"),
"undo": MessageLookupByLibrary.simpleMessage("UNDO"),
- "removedShoppingListMessage":
- MessageLookupByLibrary.simpleMessage(" removed"), //"Removed \${User.shoppingLists} "
- "noListsInDrawerMessage": MessageLookupByLibrary.simpleMessage("here is the place for your lists"),
- "notLoggedInYet": MessageLookupByLibrary.simpleMessage("Not logged in yet"),
- "newNameOfListHint": MessageLookupByLibrary.simpleMessage('The new name of the new list'),
+ "removedShoppingListMessage": MessageLookupByLibrary.simpleMessage(
+ " removed"), //"Removed \${User.shoppingLists} "
+ "noListsInDrawerMessage": MessageLookupByLibrary.simpleMessage(
+ "here is the place for your lists"),
+ "notLoggedInYet":
+ MessageLookupByLibrary.simpleMessage("Not logged in yet"),
+ "newNameOfListHint": MessageLookupByLibrary.simpleMessage(
+ 'The new name of the new list'),
"listName": MessageLookupByLibrary.simpleMessage('listname'),
"renameListTitle": MessageLookupByLibrary.simpleMessage("Rename List"),
- "renameListHint": MessageLookupByLibrary.simpleMessage('The name of the new list'),
- "chooseListToAddTitle": MessageLookupByLibrary.simpleMessage('Which list to add?'),
+ "renameListHint":
+ MessageLookupByLibrary.simpleMessage('The name of the new list'),
+ "chooseListToAddTitle":
+ MessageLookupByLibrary.simpleMessage('Which list to add?'),
"addNewListTitle": MessageLookupByLibrary.simpleMessage("Add new List"),
- "recipeCreateError": MessageLookupByLibrary.simpleMessage("Could not create recipe"),
- "recipeFromShareTitle": MessageLookupByLibrary.simpleMessage("To which list to add?"),
+ "recipeCreateError":
+ MessageLookupByLibrary.simpleMessage("Could not create recipe"),
+ "recipeFromShareTitle":
+ MessageLookupByLibrary.simpleMessage("To which list to add?"),
"recipeFromShareNew": MessageLookupByLibrary.simpleMessage("NEW"),
"recipeName": MessageLookupByLibrary.simpleMessage("Recipe"),
- "recipeNameHint": MessageLookupByLibrary.simpleMessage("Recipe ID or URL"),
- "addNewRecipeTitle": MessageLookupByLibrary.simpleMessage("Add new recipe"),
- "importNewRecipe": MessageLookupByLibrary.simpleMessage("Import recipe"),
- "importNewRecipeTitle": MessageLookupByLibrary.simpleMessage("Import new recipe"),
- "chooseAddListDialog": MessageLookupByLibrary.simpleMessage("Shopping"),
- "chooseAddRecipeDialog": MessageLookupByLibrary.simpleMessage("Chefkoch"),
- "youHaveActionItemMessage": MessageLookupByLibrary.simpleMessage('You have '), //\$action \$item
+ "recipeNameHint":
+ MessageLookupByLibrary.simpleMessage("Recipe ID or URL"),
+ "addNewRecipeTitle":
+ MessageLookupByLibrary.simpleMessage("Add new recipe"),
+ "importNewRecipe":
+ MessageLookupByLibrary.simpleMessage("Import recipe"),
+ "importNewRecipeTitle":
+ MessageLookupByLibrary.simpleMessage("Import new recipe"),
+ "chooseAddListDialog":
+ MessageLookupByLibrary.simpleMessage("Shoppinglist"),
+ "chooseAddRecipeDialog":
+ MessageLookupByLibrary.simpleMessage("Chefkoch Recipe"),
+ "youHaveActionItemMessage":
+ MessageLookupByLibrary.simpleMessage('You have '), //\$action \$item
"archived": MessageLookupByLibrary.simpleMessage('archived'),
"deleted": MessageLookupByLibrary.simpleMessage('deleted'),
- "youHaveActionNameMessage": MessageLookupByLibrary.simpleMessage('You have '), //\$action \${s.name}
+ "youHaveActionNameMessage": MessageLookupByLibrary.simpleMessage(
+ 'You have '), //\$action \${s.name}
"demoteMenu": MessageLookupByLibrary.simpleMessage('Demote'),
"promoteMenu": MessageLookupByLibrary.simpleMessage('Promote'),
"contributorUser": MessageLookupByLibrary.simpleMessage(" - User"),
"contributorAdmin": MessageLookupByLibrary.simpleMessage(" - Admin"),
- "genericErrorMessageSnackbar": MessageLookupByLibrary.simpleMessage("Something went wrong!\n"), //\${z.error}
- "nameOfNewContributorHint": MessageLookupByLibrary.simpleMessage("Name of new Contributor"),
- "wasRemovedSuccessfullyMessage": MessageLookupByLibrary.simpleMessage(" was removed successfully"),
- "loginSuccessfullMessage": MessageLookupByLibrary.simpleMessage("Login successfull."),
- "nameEmailRequiredError": MessageLookupByLibrary.simpleMessage('Name or Email is required.'),
- "usernameToShortError":
- MessageLookupByLibrary.simpleMessage('Your username has to be at least 4 characters long'),
- "emailRequiredError": MessageLookupByLibrary.simpleMessage('EMail is required.'),
- "emailIncorrectFormatError":
- MessageLookupByLibrary.simpleMessage('The email seems to be in the incorrect format.'),
- "chooseAPassword": MessageLookupByLibrary.simpleMessage('Please choose a password.'),
+ "genericErrorMessageSnackbar": MessageLookupByLibrary.simpleMessage(
+ "Something went wrong!\n"), //\${z.error}
+ "nameOfNewContributorHint":
+ MessageLookupByLibrary.simpleMessage("Name of new Contributor"),
+ "wasRemovedSuccessfullyMessage":
+ MessageLookupByLibrary.simpleMessage(" was removed successfully"),
+ "loginSuccessfullMessage":
+ MessageLookupByLibrary.simpleMessage("Login successfull."),
+ "nameEmailRequiredError":
+ MessageLookupByLibrary.simpleMessage('Name or Email is required.'),
+ "usernameToShortError": MessageLookupByLibrary.simpleMessage(
+ 'Your username has to be at least 4 characters long'),
+ "emailRequiredError":
+ MessageLookupByLibrary.simpleMessage('EMail is required.'),
+ "emailIncorrectFormatError": MessageLookupByLibrary.simpleMessage(
+ 'The email seems to be in the incorrect format.'),
+ "chooseAPassword":
+ MessageLookupByLibrary.simpleMessage('Please choose a password.'),
"login": MessageLookupByLibrary.simpleMessage("Login"),
- "usernameOrEmailForLoginHint": MessageLookupByLibrary.simpleMessage('Username or email can be used to login'),
- "usernameOrEmailTitle": MessageLookupByLibrary.simpleMessage('Username or Email'),
+ "usernameOrEmailForLoginHint": MessageLookupByLibrary.simpleMessage(
+ 'Username or email can be used to login'),
+ "usernameOrEmailTitle":
+ MessageLookupByLibrary.simpleMessage('Username or Email'),
"emailTitle": MessageLookupByLibrary.simpleMessage('Email'),
- "choosenPasswordHint": MessageLookupByLibrary.simpleMessage('The password you have choosen'),
+ "choosenPasswordHint": MessageLookupByLibrary.simpleMessage(
+ 'The password you have choosen'),
"password": MessageLookupByLibrary.simpleMessage('Password'),
"loginButton": MessageLookupByLibrary.simpleMessage('LOGIN'),
- "registerTextOnLogin": MessageLookupByLibrary.simpleMessage("Don't have an account? Create one now."),
- "usernameEmptyError": MessageLookupByLibrary.simpleMessage("Username has to be filled in"),
- "passwordEmptyError": MessageLookupByLibrary.simpleMessage("Password has to be filled in"),
- "passwordTooShortError": MessageLookupByLibrary.simpleMessage("Password has to be at least 6 charactes long"),
+ "registerTextOnLogin": MessageLookupByLibrary.simpleMessage(
+ "Don't have an account? Create one now."),
+ "usernameEmptyError": MessageLookupByLibrary.simpleMessage(
+ "Username has to be filled in"),
+ "passwordEmptyError": MessageLookupByLibrary.simpleMessage(
+ "Password has to be filled in"),
+ "passwordTooShortError": MessageLookupByLibrary.simpleMessage(
+ "Password has to be at least 6 charactes long"),
"passwordMissingCharactersError": MessageLookupByLibrary.simpleMessage(
"Password has to contain a special character (Can be emoji or any other symbol) and a letter or number"),
- "emailEmptyError": MessageLookupByLibrary.simpleMessage("Email has to be filled in"),
- "reenterPasswordError": MessageLookupByLibrary.simpleMessage("Passwords doesn't match or are empty"),
- "unknownUsernameError": MessageLookupByLibrary.simpleMessage("There is something wrong with your username"),
- "unknownEmailError": MessageLookupByLibrary.simpleMessage("There is something wrong with your email"),
- "unknownPasswordError": MessageLookupByLibrary.simpleMessage("There is something wrong with your password"),
- "unknownReenterPasswordError":
- MessageLookupByLibrary.simpleMessage("There is something wrong with your password validation"),
- "registrationSuccessfulMessage": MessageLookupByLibrary.simpleMessage("Registration successfull."),
- "registrationTitle": MessageLookupByLibrary.simpleMessage("Registration"),
- "nameEmptyError": MessageLookupByLibrary.simpleMessage('Name is required.'),
- "chooseAPasswordPrompt": MessageLookupByLibrary.simpleMessage('Please choose a password.'),
- "reenterPasswordPrompt": MessageLookupByLibrary.simpleMessage('Please reenter your password.'),
- "passwordsDontMatchError": MessageLookupByLibrary.simpleMessage('Passwords don\'t match'),
- "usernameRegisterHint": MessageLookupByLibrary.simpleMessage('The name to login and to be found by others'),
+ "emailEmptyError":
+ MessageLookupByLibrary.simpleMessage("Email has to be filled in"),
+ "reenterPasswordError": MessageLookupByLibrary.simpleMessage(
+ "Passwords doesn't match or are empty"),
+ "unknownUsernameError": MessageLookupByLibrary.simpleMessage(
+ "There is something wrong with your username"),
+ "unknownEmailError": MessageLookupByLibrary.simpleMessage(
+ "There is something wrong with your email"),
+ "unknownPasswordError": MessageLookupByLibrary.simpleMessage(
+ "There is something wrong with your password"),
+ "unknownReenterPasswordError": MessageLookupByLibrary.simpleMessage(
+ "There is something wrong with your password validation"),
+ "registrationSuccessfulMessage":
+ MessageLookupByLibrary.simpleMessage("Registration successfull."),
+ "registrationTitle":
+ MessageLookupByLibrary.simpleMessage("Registration"),
+ "nameEmptyError":
+ MessageLookupByLibrary.simpleMessage('Name is required.'),
+ "chooseAPasswordPrompt":
+ MessageLookupByLibrary.simpleMessage('Please choose a password.'),
+ "reenterPasswordPrompt": MessageLookupByLibrary.simpleMessage(
+ 'Please reenter your password.'),
+ "passwordsDontMatchError":
+ MessageLookupByLibrary.simpleMessage('Passwords don\'t match'),
+ "usernameRegisterHint": MessageLookupByLibrary.simpleMessage(
+ 'The name to login and to be found by others'),
"username": MessageLookupByLibrary.simpleMessage('Username'),
- "emailRegisterHint": MessageLookupByLibrary.simpleMessage('The email to login and to be found by others'),
- "passwordRegisterHint": MessageLookupByLibrary.simpleMessage('The password to secure your account'),
- "retypePasswordHint": MessageLookupByLibrary.simpleMessage('Re-type your password for validation'),
- "retypePasswordTitle": MessageLookupByLibrary.simpleMessage('Re-type Password'),
+ "emailRegisterHint": MessageLookupByLibrary.simpleMessage(
+ 'The email to login and to be found by others'),
+ "passwordRegisterHint": MessageLookupByLibrary.simpleMessage(
+ 'The password to secure your account'),
+ "retypePasswordHint": MessageLookupByLibrary.simpleMessage(
+ 'Re-type your password for validation'),
+ "retypePasswordTitle":
+ MessageLookupByLibrary.simpleMessage('Re-type Password'),
"registerButton": MessageLookupByLibrary.simpleMessage('REGISTER'),
- "discardNewProduct": MessageLookupByLibrary.simpleMessage('Discard new product?'),
+ "discardNewProduct":
+ MessageLookupByLibrary.simpleMessage('Discard new product?'),
"cancelButton": MessageLookupByLibrary.simpleMessage('CANCEL'),
"acceptButton": MessageLookupByLibrary.simpleMessage('ACCEPT'),
"discardButton": MessageLookupByLibrary.simpleMessage('DISCARD'),
- "fixErrorsBeforeSubmittingPrompt":
- MessageLookupByLibrary.simpleMessage('Please fix the errors in red before submitting.'),
+ "fixErrorsBeforeSubmittingPrompt": MessageLookupByLibrary.simpleMessage(
+ 'Please fix the errors in red before submitting.'),
"newProductTitle": MessageLookupByLibrary.simpleMessage('New Product'),
"saveButton": MessageLookupByLibrary.simpleMessage('SAVE'),
- "newProductName": MessageLookupByLibrary.simpleMessage("Product Name *"),
- "newProductNameHint": MessageLookupByLibrary.simpleMessage("How is this product called?"),
- "newProductBrandName": MessageLookupByLibrary.simpleMessage("Brand Name *"),
- "newProductBrandNameHint": MessageLookupByLibrary.simpleMessage("Which company sells this product?"),
- "newProductWeight": MessageLookupByLibrary.simpleMessage("Amount with Unit"),
- "newProductWeightHint": MessageLookupByLibrary.simpleMessage("Example: 1.5l or 100g"),
- "newProductAddToList": MessageLookupByLibrary.simpleMessage("Add to current list"),
- "newProductAddedToList": MessageLookupByLibrary.simpleMessage(" was added to list "),
- "newProductStarExplanation": MessageLookupByLibrary.simpleMessage('* indicates required field'),
- "fieldRequiredError": MessageLookupByLibrary.simpleMessage("This field is required!"),
- "newProductNameToShort": MessageLookupByLibrary.simpleMessage("This name seems to be to short"),
- "addedProduct": MessageLookupByLibrary.simpleMessage(' added'), //'Added "\$name"'
- "productWasAlreadyInList":
- MessageLookupByLibrary.simpleMessage(' was already in list. The amount was increased by 1'), //"\$name" was
- "searchProductHint": MessageLookupByLibrary.simpleMessage("Search Product"),
- "noMoreProductsMessage": MessageLookupByLibrary.simpleMessage("No more products found!}"),
+ "newProductName":
+ MessageLookupByLibrary.simpleMessage("Product Name *"),
+ "newProductNameHint":
+ MessageLookupByLibrary.simpleMessage("How is this product called?"),
+ "newProductBrandName":
+ MessageLookupByLibrary.simpleMessage("Brand Name *"),
+ "newProductBrandNameHint": MessageLookupByLibrary.simpleMessage(
+ "Which company sells this product?"),
+ "newProductWeight":
+ MessageLookupByLibrary.simpleMessage("Amount with Unit"),
+ "newProductWeightHint":
+ MessageLookupByLibrary.simpleMessage("Example: 1.5l or 100g"),
+ "newProductAddToList":
+ MessageLookupByLibrary.simpleMessage("Add to current list"),
+ "newProductAddedToList":
+ MessageLookupByLibrary.simpleMessage(" was added to list "),
+ "newProductStarExplanation":
+ MessageLookupByLibrary.simpleMessage('* indicates required field'),
+ "fieldRequiredError":
+ MessageLookupByLibrary.simpleMessage("This field is required!"),
+ "newProductNameToShort": MessageLookupByLibrary.simpleMessage(
+ "This name seems to be to short"),
+ "addedProduct":
+ MessageLookupByLibrary.simpleMessage(' added'), //'Added "\$name"'
+ "productWasAlreadyInList": MessageLookupByLibrary.simpleMessage(
+ ' was already in list. The amount was increased by 1'), //"\$name" was
+ "searchProductHint":
+ MessageLookupByLibrary.simpleMessage("Search Product"),
+ "noMoreProductsMessage":
+ MessageLookupByLibrary.simpleMessage("No more products found!}"),
"codeText": MessageLookupByLibrary.simpleMessage("Code: "),
"removed": MessageLookupByLibrary.simpleMessage("removed"),
- "changePrimaryColor": MessageLookupByLibrary.simpleMessage("Primary Color"),
- "changeAccentColor": MessageLookupByLibrary.simpleMessage("Accent Color"),
+ "changePrimaryColor":
+ MessageLookupByLibrary.simpleMessage("Primary Color"),
+ "changeAccentColor":
+ MessageLookupByLibrary.simpleMessage("Accent Color"),
"changeDarkTheme": MessageLookupByLibrary.simpleMessage("Dark Theme"),
- "changeAccentTextColor": MessageLookupByLibrary.simpleMessage("Bright Icons"),
+ "changeAccentTextColor":
+ MessageLookupByLibrary.simpleMessage("Bright Icons"),
"autoSync": MessageLookupByLibrary.simpleMessage("Auto-Sync"),
- "changePasswordButton": MessageLookupByLibrary.simpleMessage("CHANGE PASSWORD"),
- "currentPassword": MessageLookupByLibrary.simpleMessage("Current password"),
- "currentPasswordHint": MessageLookupByLibrary.simpleMessage("Current password that should be changed"),
+ "changePasswordButton":
+ MessageLookupByLibrary.simpleMessage("CHANGE PASSWORD"),
+ "currentPassword":
+ MessageLookupByLibrary.simpleMessage("Current password"),
+ "currentPasswordHint": MessageLookupByLibrary.simpleMessage(
+ "Current password that should be changed"),
"newPassword": MessageLookupByLibrary.simpleMessage("New password"),
- "newPasswordHint": MessageLookupByLibrary.simpleMessage("The new password you have chosen"),
- "repeatNewPassword": MessageLookupByLibrary.simpleMessage("Repeat new password"),
- "repeatNewPasswordHint": MessageLookupByLibrary.simpleMessage("Repeat the new password you have chosen"),
- "changePasswordPD": MessageLookupByLibrary.simpleMessage("Change Password"),
+ "newPasswordHint": MessageLookupByLibrary.simpleMessage(
+ "The new password you have chosen"),
+ "repeatNewPassword":
+ MessageLookupByLibrary.simpleMessage("Repeat new password"),
+ "repeatNewPasswordHint": MessageLookupByLibrary.simpleMessage(
+ "Repeat the new password you have chosen"),
+ "changePasswordPD":
+ MessageLookupByLibrary.simpleMessage("Change Password"),
"successful": MessageLookupByLibrary.simpleMessage("Successful"),
- "passwordSet": MessageLookupByLibrary.simpleMessage("Your password has been set"),
+ "passwordSet":
+ MessageLookupByLibrary.simpleMessage("Your password has been set"),
"tokenExpired": MessageLookupByLibrary.simpleMessage("Token expired"),
"tokenExpiredExplanation": MessageLookupByLibrary.simpleMessage(
"Your token has expired. Login is required. If this happends multiple times per month, please contact us."),
"noListLoaded": MessageLookupByLibrary.simpleMessage("No List Loaded"),
- "renameListItem": MessageLookupByLibrary.simpleMessage("Rename Product"),
- "renameListItemHint": MessageLookupByLibrary.simpleMessage("The new name of the product"),
- "renameListItemLabel": MessageLookupByLibrary.simpleMessage("new product name"),
- "discardNewTheme": MessageLookupByLibrary.simpleMessage('Discard new theme?'),
- "forgotPassword": MessageLookupByLibrary.simpleMessage('Forgot password?'),
- "bePatient":
- MessageLookupByLibrary.simpleMessage('Please be patient, the server is processing your request already'),
+ "renameListItem":
+ MessageLookupByLibrary.simpleMessage("Rename Product"),
+ "renameListItemHint":
+ MessageLookupByLibrary.simpleMessage("The new name of the product"),
+ "renameListItemLabel":
+ MessageLookupByLibrary.simpleMessage("new product name"),
+ "discardNewTheme":
+ MessageLookupByLibrary.simpleMessage('Discard new theme?'),
+ "forgotPassword":
+ MessageLookupByLibrary.simpleMessage('Forgot password?'),
+ "bePatient": MessageLookupByLibrary.simpleMessage(
+ 'Please be patient, the server is processing your request already'),
"logout": MessageLookupByLibrary.simpleMessage('Logout'),
"deleteListTitle": MessageLookupByLibrary.simpleMessage('Delete List '),
- "deleteListText":
- MessageLookupByLibrary.simpleMessage('Do you really want to delete the list? This CAN\'T be undone!'),
+ "deleteListText": MessageLookupByLibrary.simpleMessage(
+ 'Do you really want to delete the list? This CAN\'T be undone!'),
"exportAsPdf": MessageLookupByLibrary.simpleMessage('Export as PDF'),
- "boughtProducts": MessageLookupByLibrary.simpleMessage('Bought Products'),
- "nothingBoughtYet": MessageLookupByLibrary.simpleMessage('Nothing bought yet'),
+ "boughtProducts":
+ MessageLookupByLibrary.simpleMessage('Bought Products'),
+ "nothingBoughtYet":
+ MessageLookupByLibrary.simpleMessage('Nothing bought yet'),
"reorderItems": MessageLookupByLibrary.simpleMessage('Reorder'),
"refresh": MessageLookupByLibrary.simpleMessage('Refresh'),
"okayButton": MessageLookupByLibrary.simpleMessage('OKAY'),
- "requestPasswordResetButton": MessageLookupByLibrary.simpleMessage("REQUEST PASSWORD RESET"),
- "requestPasswordResetTitle": MessageLookupByLibrary.simpleMessage("Password Reset"),
+ "requestPasswordResetButton":
+ MessageLookupByLibrary.simpleMessage("REQUEST PASSWORD RESET"),
+ "requestPasswordResetTitle":
+ MessageLookupByLibrary.simpleMessage("Password Reset"),
"requestPasswordResetSuccess": MessageLookupByLibrary.simpleMessage(
'If the email exists, the password request was successfully requested. Further instructions can be found in the email, that was send to the address.'),
"settings": MessageLookupByLibrary.simpleMessage('Settings'),
+ "useMaterial3": MessageLookupByLibrary.simpleMessage(
+ 'Use Material Design 3 (Colors based on Android Version)'),
+ "elevateAppBar":
+ MessageLookupByLibrary.simpleMessage('Colorize Title Background'),
};
}
diff --git a/lib/localization/nssl_strings.dart b/lib/localization/nssl_strings.dart
index fc17aa2..0cc3e3c 100644
--- a/lib/localization/nssl_strings.dart
+++ b/lib/localization/nssl_strings.dart
@@ -21,221 +21,354 @@ class NSSLStrings {
}
// static final NSSLStrings instance = NSSLStrings();
- String options() => Intl.message('Options', name: 'options', locale: _localeName);
- String changeTheme() => Intl.message('Change Theme', name: 'changeTheme', locale: _localeName);
+ String options() =>
+ Intl.message('Options', name: 'options', locale: _localeName);
+ String changeTheme() =>
+ Intl.message('Change Theme', name: 'changeTheme', locale: _localeName);
String scanPB() => Intl.message('SCAN', name: 'scanPB', locale: _localeName);
String addPB() => Intl.message('ADD', name: 'addPB', locale: _localeName);
- String searchPB() => Intl.message('SEARCH', name: 'searchPB', locale: _localeName);
- String deleteCrossedOutPB() => Intl.message('DELETE CROSSED OUT', name: 'deleteCrossedOutPB', locale: _localeName);
- String addListPB() => Intl.message('ADD LIST', name: 'addListPB', locale: _localeName);
- String contributors() => Intl.message('Contributors', name: 'contributors', locale: _localeName);
- String rename() => Intl.message('Rename', name: 'rename', locale: _localeName);
- String remove() => Intl.message('Remove', name: 'remove', locale: _localeName);
- String addProduct() => Intl.message('Add Product', name: 'addProduct', locale: _localeName);
- String addProductWithoutSearch() => Intl.message('Insert the name of the product, without searching in the database',
- name: 'addProductWithoutSearch', locale: _localeName);
- String productName() => Intl.message('Product name', name: 'productName', locale: _localeName);
+ String searchPB() =>
+ Intl.message('SEARCH', name: 'searchPB', locale: _localeName);
+ String deleteCrossedOutPB() => Intl.message('DELETE CROSSED OUT',
+ name: 'deleteCrossedOutPB', locale: _localeName);
+ String addListPB() =>
+ Intl.message('ADD LIST', name: 'addListPB', locale: _localeName);
+ String contributors() =>
+ Intl.message('Contributors', name: 'contributors', locale: _localeName);
+ String rename() =>
+ Intl.message('Rename', name: 'rename', locale: _localeName);
+ String remove() =>
+ Intl.message('Remove', name: 'remove', locale: _localeName);
+ String addProduct() =>
+ Intl.message('Add Product', name: 'addProduct', locale: _localeName);
+ String addProductWithoutSearch() => Intl.message(
+ 'Insert the name of the product, without searching in the database',
+ name: 'addProductWithoutSearch',
+ locale: _localeName);
+ String productName() =>
+ Intl.message('Product name', name: 'productName', locale: _localeName);
String messageDeleteAllCrossedOut() =>
- Intl.message('You have deleted all crossed out items', name: 'messageDeleteAllCrossedOut', locale: _localeName);
+ Intl.message('You have deleted all crossed out items',
+ name: 'messageDeleteAllCrossedOut', locale: _localeName);
String undo() => Intl.message('UNDO', name: 'undo', locale: _localeName);
String noListsInDrawerMessage() =>
- Intl.message('Here is the place for your lists', name: 'noListsInDrawerMessage', locale: _localeName);
- String notLoggedInYet() => Intl.message('Not logged in yet', name: 'notLoggedInYet', locale: _localeName);
- String newNameOfListHint() =>
- Intl.message('The new name of the new list', name: 'newNameOfListHint', locale: _localeName);
- String listName() => Intl.message('Listname', name: 'listName', locale: _localeName);
- String renameListTitle() => Intl.message('Rename List', name: 'renameListTitle', locale: _localeName);
- String renameListHint() => Intl.message('The name of the new list', name: 'renameListHint', locale: _localeName);
- String chooseListToAddTitle() =>
- Intl.message('Which list to add?', name: 'chooseListToAddTitle', locale: _localeName);
- String addNewListTitle() => Intl.message('Add new List', name: 'addNewListTitle', locale: _localeName);
- String recipeCreateError() => Intl.message('Could not create recipe', name: 'recipeCreateError', locale: _localeName);
- String recipeFromShareTitle() =>
- Intl.message('To which list to add?', name: 'recipeFromShareTitle', locale: _localeName);
- String recipeFromShareNew() => Intl.message('NEW', name: 'recipeFromShareNew', locale: _localeName);
- String recipeName() => Intl.message('Recipe', name: 'recipeName', locale: _localeName);
- String recipeNameHint() => Intl.message('Recipe ID or URL', name: 'recipeNameHint', locale: _localeName);
- String addNewRecipeTitle() => Intl.message('Add new recipe', name: 'addNewRecipeTitle', locale: _localeName);
- String importNewRecipe() => Intl.message('Import recipe', name: 'importNewRecipe', locale: _localeName);
- String importNewRecipeTitle() => Intl.message('Import new recipe', name: 'importNewRecipeTitle', locale: _localeName);
- String chooseAddListDialog() => Intl.message('Shopping', name: 'chooseAddListDialog', locale: _localeName);
- String chooseAddRecipeDialog() => Intl.message('Chefkoch', name: 'chooseAddRecipeDialog', locale: _localeName);
- String youHaveActionItemMessage() => Intl.message('You have ', name: 'youHaveActionItemMessage', locale: _localeName);
- String archived() => Intl.message('archived', name: 'archived', locale: _localeName);
- String deleted() => Intl.message('deleted', name: 'deleted', locale: _localeName);
- String youHaveActionNameMessage() => Intl.message('You have ', name: 'youHaveActionNameMessage', locale: _localeName);
- String demoteMenu() => Intl.message('Demote', name: 'demoteMenu', locale: _localeName);
- String promoteMenu() => Intl.message('Promote', name: 'promoteMenu', locale: _localeName);
- String contributorUser() => Intl.message(" - User", name: 'contributorUser', locale: _localeName);
- String contributorAdmin() => Intl.message(" - Admin", name: 'contributorAdmin', locale: _localeName);
+ Intl.message('Here is the place for your lists',
+ name: 'noListsInDrawerMessage', locale: _localeName);
+ String notLoggedInYet() => Intl.message('Not logged in yet',
+ name: 'notLoggedInYet', locale: _localeName);
+ String newNameOfListHint() => Intl.message('The new name of the new list',
+ name: 'newNameOfListHint', locale: _localeName);
+ String listName() =>
+ Intl.message('Listname', name: 'listName', locale: _localeName);
+ String renameListTitle() =>
+ Intl.message('Rename List', name: 'renameListTitle', locale: _localeName);
+ String renameListHint() => Intl.message('The name of the new list',
+ name: 'renameListHint', locale: _localeName);
+ String chooseListToAddTitle() => Intl.message('Which list to add?',
+ name: 'chooseListToAddTitle', locale: _localeName);
+ String addNewListTitle() => Intl.message('Add new List',
+ name: 'addNewListTitle', locale: _localeName);
+ String recipeCreateError() => Intl.message('Could not create recipe',
+ name: 'recipeCreateError', locale: _localeName);
+ String recipeFromShareTitle() => Intl.message('To which list to add?',
+ name: 'recipeFromShareTitle', locale: _localeName);
+ String recipeFromShareNew() =>
+ Intl.message('NEW', name: 'recipeFromShareNew', locale: _localeName);
+ String recipeName() =>
+ Intl.message('Recipe', name: 'recipeName', locale: _localeName);
+ String recipeNameHint() => Intl.message('Recipe ID or URL',
+ name: 'recipeNameHint', locale: _localeName);
+ String addNewRecipeTitle() => Intl.message('Add new recipe',
+ name: 'addNewRecipeTitle', locale: _localeName);
+ String importNewRecipe() => Intl.message('Import recipe',
+ name: 'importNewRecipe', locale: _localeName);
+ String importNewRecipeTitle() => Intl.message('Import new recipe',
+ name: 'importNewRecipeTitle', locale: _localeName);
+ String chooseAddListDialog() => Intl.message('Shoppinglist',
+ name: 'chooseAddListDialog', locale: _localeName);
+ String chooseAddRecipeDialog() => Intl.message('Chefkoch Recipe',
+ name: 'chooseAddRecipeDialog', locale: _localeName);
+ String youHaveActionItemMessage() => Intl.message('You have ',
+ name: 'youHaveActionItemMessage', locale: _localeName);
+ String archived() =>
+ Intl.message('archived', name: 'archived', locale: _localeName);
+ String deleted() =>
+ Intl.message('deleted', name: 'deleted', locale: _localeName);
+ String youHaveActionNameMessage() => Intl.message('You have ',
+ name: 'youHaveActionNameMessage', locale: _localeName);
+ String demoteMenu() =>
+ Intl.message('Demote', name: 'demoteMenu', locale: _localeName);
+ String promoteMenu() =>
+ Intl.message('Promote', name: 'promoteMenu', locale: _localeName);
+ String contributorUser() =>
+ Intl.message(" - User", name: 'contributorUser', locale: _localeName);
+ String contributorAdmin() =>
+ Intl.message(" - Admin", name: 'contributorAdmin', locale: _localeName);
String genericErrorMessageSnackbar() =>
- Intl.message('Something went wrong!\n', name: 'genericErrorMessageSnackbar', locale: _localeName);
- String nameOfNewContributorHint() =>
- Intl.message('Name of new Contributor', name: 'nameOfNewContributorHint', locale: _localeName);
+ Intl.message('Something went wrong!\n',
+ name: 'genericErrorMessageSnackbar', locale: _localeName);
+ String nameOfNewContributorHint() => Intl.message('Name of new Contributor',
+ name: 'nameOfNewContributorHint', locale: _localeName);
String wasRemovedSuccessfullyMessage() =>
- Intl.message(' was removed successfully', name: 'wasRemovedSuccessfullyMessage', locale: _localeName);
+ Intl.message(' was removed successfully',
+ name: 'wasRemovedSuccessfullyMessage', locale: _localeName);
String loginSuccessfulMessage() =>
- Intl.message('Login successfull, lists will be loaded.', name: 'loginSuccessfullMessage', locale: _localeName);
- String nameEmailRequiredError() =>
- Intl.message('Name or Email is required.', name: 'nameEmailRequiredError', locale: _localeName);
- String usernameToShortError() => Intl.message('Your username has to be at least 4 characters long',
- name: 'usernameToShortError', locale: _localeName);
- String emailRequiredError() => Intl.message('EMail is required.', name: 'emailRequiredError', locale: _localeName);
- String emailIncorrectFormatError() => Intl.message('The email seems to be in the incorrect format.',
- name: 'emailIncorrectFormatError', locale: _localeName);
- String chooseAPassword() => Intl.message('Please choose a password.', name: 'chooseAPassword', locale: _localeName);
+ Intl.message('Login successfull, lists will be loaded.',
+ name: 'loginSuccessfullMessage', locale: _localeName);
+ String nameEmailRequiredError() => Intl.message('Name or Email is required.',
+ name: 'nameEmailRequiredError', locale: _localeName);
+ String usernameToShortError() =>
+ Intl.message('Your username has to be at least 4 characters long',
+ name: 'usernameToShortError', locale: _localeName);
+ String emailRequiredError() => Intl.message('EMail is required.',
+ name: 'emailRequiredError', locale: _localeName);
+ String emailIncorrectFormatError() =>
+ Intl.message('The email seems to be in the incorrect format.',
+ name: 'emailIncorrectFormatError', locale: _localeName);
+ String chooseAPassword() => Intl.message('Please choose a password.',
+ name: 'chooseAPassword', locale: _localeName);
String login() => Intl.message('Login', name: 'login', locale: _localeName);
String usernameOrEmailForLoginHint() =>
- Intl.message('Username or email can be used to login', name: 'usernameOrEmailForLoginHint', locale: _localeName);
- String usernameOrEmailTitle() => Intl.message('Username or Email', name: 'usernameOrEmailTitle', locale: _localeName);
- String emailTitle() => Intl.message('Email', name: 'emailTitle', locale: _localeName);
- String choosenPasswordHint() =>
- Intl.message('The password you have choosen', name: 'choosenPasswordHint', locale: _localeName);
- String password() => Intl.message('Password', name: 'password', locale: _localeName);
- String loginButton() => Intl.message('LOGIN', name: 'loginButton', locale: _localeName);
+ Intl.message('Username or email can be used to login',
+ name: 'usernameOrEmailForLoginHint', locale: _localeName);
+ String usernameOrEmailTitle() => Intl.message('Username or Email',
+ name: 'usernameOrEmailTitle', locale: _localeName);
+ String emailTitle() =>
+ Intl.message('Email', name: 'emailTitle', locale: _localeName);
+ String choosenPasswordHint() => Intl.message('The password you have choosen',
+ name: 'choosenPasswordHint', locale: _localeName);
+ String password() =>
+ Intl.message('Password', name: 'password', locale: _localeName);
+ String loginButton() =>
+ Intl.message('LOGIN', name: 'loginButton', locale: _localeName);
String registerTextOnLogin() =>
- Intl.message('Don\'t have an account? Create one now.', name: 'registerTextOnLogin', locale: _localeName);
- String usernameEmptyError() =>
- Intl.message('Username has to be filled in', name: 'usernameEmptyError', locale: _localeName);
- String passwordEmptyError() =>
- Intl.message('Password has to be filled in', name: 'passwordEmptyError', locale: _localeName);
+ Intl.message('Don\'t have an account? Create one now.',
+ name: 'registerTextOnLogin', locale: _localeName);
+ String usernameEmptyError() => Intl.message('Username has to be filled in',
+ name: 'usernameEmptyError', locale: _localeName);
+ String passwordEmptyError() => Intl.message('Password has to be filled in',
+ name: 'passwordEmptyError', locale: _localeName);
String passwordTooShortError() =>
- Intl.message('Password has to be at least 6 charactes long', name: 'passwordTooShortError', locale: _localeName);
+ Intl.message('Password has to be at least 6 charactes long',
+ name: 'passwordTooShortError', locale: _localeName);
String passwordMissingCharactersError() => Intl.message(
'Password has to contain a special character (Can be emoji or any other symbol) and a letter or number',
name: 'passwordMissingCharactersError',
locale: _localeName);
- String emailEmptyError() => Intl.message('Email has to be filled in', name: 'emailEmptyError', locale: _localeName);
+ String emailEmptyError() => Intl.message('Email has to be filled in',
+ name: 'emailEmptyError', locale: _localeName);
String reenterPasswordError() =>
- Intl.message('Passwords doesn\'t match or are empty', name: 'reenterPasswordError', locale: _localeName);
+ Intl.message('Passwords doesn\'t match or are empty',
+ name: 'reenterPasswordError', locale: _localeName);
String unknownUsernameError() =>
- Intl.message('There is something wrong with your username', name: 'unknownUsernameError', locale: _localeName);
+ Intl.message('There is something wrong with your username',
+ name: 'unknownUsernameError', locale: _localeName);
String unknownEmailError() =>
- Intl.message('There is something wrong with your email', name: 'unknownEmailError', locale: _localeName);
+ Intl.message('There is something wrong with your email',
+ name: 'unknownEmailError', locale: _localeName);
String unknownPasswordError() =>
- Intl.message('There is something wrong with your password', name: 'unknownPasswordError', locale: _localeName);
- String unknownReenterPasswordError() => Intl.message('There is something wrong with your password validation',
- name: 'unknownReenterPasswordError', locale: _localeName);
+ Intl.message('There is something wrong with your password',
+ name: 'unknownPasswordError', locale: _localeName);
+ String unknownReenterPasswordError() =>
+ Intl.message('There is something wrong with your password validation',
+ name: 'unknownReenterPasswordError', locale: _localeName);
String registrationSuccessfulMessage() =>
- Intl.message('Registration successfull.', name: 'registrationSuccessfullMessage', locale: _localeName);
- String registrationTitle() => Intl.message('Registration', name: 'registrationTitle', locale: _localeName);
- String nameEmptyError() => Intl.message('Name is required.', name: 'nameEmptyError', locale: _localeName);
- String chooseAPasswordPrompt() =>
- Intl.message('Please choose a password.', name: 'chooseAPasswordPrompt', locale: _localeName);
+ Intl.message('Registration successfull.',
+ name: 'registrationSuccessfullMessage', locale: _localeName);
+ String registrationTitle() => Intl.message('Registration',
+ name: 'registrationTitle', locale: _localeName);
+ String nameEmptyError() => Intl.message('Name is required.',
+ name: 'nameEmptyError', locale: _localeName);
+ String chooseAPasswordPrompt() => Intl.message('Please choose a password.',
+ name: 'chooseAPasswordPrompt', locale: _localeName);
String reenterPasswordPrompt() =>
- Intl.message('Please reenter your password.', name: 'reenterPasswordPromt', locale: _localeName);
- String passwordsDontMatchError() =>
- Intl.message('Passwords don\'t match', name: 'passwordsDontMatchError', locale: _localeName);
+ Intl.message('Please reenter your password.',
+ name: 'reenterPasswordPromt', locale: _localeName);
+ String passwordsDontMatchError() => Intl.message('Passwords don\'t match',
+ name: 'passwordsDontMatchError', locale: _localeName);
String usernameRegisterHint() =>
- Intl.message('The name to login and to be found by others', name: 'usernameRegisterHint', locale: _localeName);
- String username() => Intl.message('Username', name: 'username', locale: _localeName);
+ Intl.message('The name to login and to be found by others',
+ name: 'usernameRegisterHint', locale: _localeName);
+ String username() =>
+ Intl.message('Username', name: 'username', locale: _localeName);
String emailRegisterHint() =>
- Intl.message('The email to login and to be found by others', name: 'emailRegisterHint', locale: _localeName);
+ Intl.message('The email to login and to be found by others',
+ name: 'emailRegisterHint', locale: _localeName);
String passwordRegisterHint() =>
- Intl.message('The password to secure your account', name: 'passwordRegisterHint', locale: _localeName);
+ Intl.message('The password to secure your account',
+ name: 'passwordRegisterHint', locale: _localeName);
String retypePasswordHint() =>
- Intl.message('Re-type your password for validation', name: 'retypePasswordHint', locale: _localeName);
- String retypePasswordTitle() => Intl.message('Re-type Password', name: 'retypePasswordTitle', locale: _localeName);
- String registerButton() => Intl.message('REGISTER', name: 'registerButton', locale: _localeName);
- String discardNewProduct() => Intl.message('Discard new product?', name: 'discardNewProduct', locale: _localeName);
- String cancelButton() => Intl.message('CANCEL', name: 'cancelButton', locale: _localeName);
- String acceptButton() => Intl.message('ACCEPT', name: 'acceptButton', locale: _localeName);
- String discardButton() => Intl.message('DISCARD', name: 'discardButton', locale: _localeName);
- String fixErrorsBeforeSubmittingPrompt() => Intl.message('Please fix the errors in red before submitting.',
- name: 'fixErrorsBeforeSubmittingPrompt', locale: _localeName);
- String newProductTitle() => Intl.message('New Product', name: 'newProductTitle', locale: _localeName);
- String saveButton() => Intl.message('SAVE', name: 'saveButton', locale: _localeName);
- String newProductName() => Intl.message('Product Name *', name: 'newProductName', locale: _localeName);
- String newProductNameHint() =>
- Intl.message('How is this product called?', name: 'newProductNameHint', locale: _localeName);
- String newProductBrandName() => Intl.message('Brand Name *', name: 'newProductBrandName', locale: _localeName);
+ Intl.message('Re-type your password for validation',
+ name: 'retypePasswordHint', locale: _localeName);
+ String retypePasswordTitle() => Intl.message('Re-type Password',
+ name: 'retypePasswordTitle', locale: _localeName);
+ String registerButton() =>
+ Intl.message('REGISTER', name: 'registerButton', locale: _localeName);
+ String discardNewProduct() => Intl.message('Discard new product?',
+ name: 'discardNewProduct', locale: _localeName);
+ String cancelButton() =>
+ Intl.message('CANCEL', name: 'cancelButton', locale: _localeName);
+ String acceptButton() =>
+ Intl.message('ACCEPT', name: 'acceptButton', locale: _localeName);
+ String discardButton() =>
+ Intl.message('DISCARD', name: 'discardButton', locale: _localeName);
+ String fixErrorsBeforeSubmittingPrompt() =>
+ Intl.message('Please fix the errors in red before submitting.',
+ name: 'fixErrorsBeforeSubmittingPrompt', locale: _localeName);
+ String newProductTitle() =>
+ Intl.message('New Product', name: 'newProductTitle', locale: _localeName);
+ String saveButton() =>
+ Intl.message('SAVE', name: 'saveButton', locale: _localeName);
+ String newProductName() => Intl.message('Product Name *',
+ name: 'newProductName', locale: _localeName);
+ String newProductNameHint() => Intl.message('How is this product called?',
+ name: 'newProductNameHint', locale: _localeName);
+ String newProductBrandName() => Intl.message('Brand Name *',
+ name: 'newProductBrandName', locale: _localeName);
String newProductBrandNameHint() =>
- Intl.message('Which company sells this product?', name: 'newProductBrandNameHint', locale: _localeName);
- String newProductWeight() => Intl.message('Weight', name: 'newProductWeight', locale: _localeName);
+ Intl.message('Which company sells this product?',
+ name: 'newProductBrandNameHint', locale: _localeName);
+ String newProductWeight() =>
+ Intl.message('Weight', name: 'newProductWeight', locale: _localeName);
String newProductWeightHint() =>
- Intl.message('What is the normal packaging size?', name: 'newProductWeightHint', locale: _localeName);
- String newProductAddToList() => Intl.message('Add to current list', name: 'newProductAddToList', locale: _localeName);
- String newProductAddedToList() => Intl.message(' added to list ', name: 'newProductAddedToList', locale: _localeName);
+ Intl.message('What is the normal packaging size?',
+ name: 'newProductWeightHint', locale: _localeName);
+ String newProductAddToList() => Intl.message('Add to current list',
+ name: 'newProductAddToList', locale: _localeName);
+ String newProductAddedToList() => Intl.message(' added to list ',
+ name: 'newProductAddedToList', locale: _localeName);
String newProductStarExplanation() =>
- Intl.message('* indicates required field', name: 'newProductStarExplanation', locale: _localeName);
- String fieldRequiredError() =>
- Intl.message('This field is required!', name: 'fieldRequiredError', locale: _localeName);
+ Intl.message('* indicates required field',
+ name: 'newProductStarExplanation', locale: _localeName);
+ String fieldRequiredError() => Intl.message('This field is required!',
+ name: 'fieldRequiredError', locale: _localeName);
String newProductNameToShort() =>
- Intl.message('This name seems to be to short', name: 'newProductNameToShort', locale: _localeName);
- String addedProduct() => Intl.message(' added', name: 'addedProduct', locale: _localeName);
- String productWasAlreadyInList() => Intl.message(' was already in list. The amount was increased by 1',
- name: 'productWasAlreadyInList', locale: _localeName);
- String searchProductHint() => Intl.message('Search Product', name: 'searchProductHint', locale: _localeName);
- String noMoreProductsMessage() =>
- Intl.message('No more products found!', name: 'noMoreProductsMessage', locale: _localeName);
- String codeText() => Intl.message('Code: ', name: 'codeText', locale: _localeName);
- String removed() => Intl.message('removed', name: 'removed', locale: _localeName);
- String changePrimaryColor() => Intl.message('Primary Color', name: 'changePrimaryColor', locale: _localeName);
- String changeAccentColor() => Intl.message('Accent Color', name: 'changeAccentColor', locale: _localeName);
- String changeDarkTheme() => Intl.message('Dark Theme', name: 'changeDarkTheme', locale: _localeName);
- String changeAccentTextColor() => Intl.message('Dark Icons', name: 'changeAccentTextColor', locale: _localeName);
- String autoSync() => Intl.message('Auto-Sync', name: 'autoSync', locale: _localeName);
- String changePasswordButton() => Intl.message('CHANGE PASSWORD', name: 'changePasswordButton', locale: _localeName);
- String oldPassword() => Intl.message('Current password', name: 'currentPassword', locale: _localeName);
+ Intl.message('This name seems to be to short',
+ name: 'newProductNameToShort', locale: _localeName);
+ String addedProduct() =>
+ Intl.message(' added', name: 'addedProduct', locale: _localeName);
+ String productWasAlreadyInList() =>
+ Intl.message(' was already in list. The amount was increased by 1',
+ name: 'productWasAlreadyInList', locale: _localeName);
+ String searchProductHint() => Intl.message('Search Product',
+ name: 'searchProductHint', locale: _localeName);
+ String noMoreProductsMessage() => Intl.message('No more products found!',
+ name: 'noMoreProductsMessage', locale: _localeName);
+ String codeText() =>
+ Intl.message('Code: ', name: 'codeText', locale: _localeName);
+ String removed() =>
+ Intl.message('removed', name: 'removed', locale: _localeName);
+ String changePrimaryColor() => Intl.message('Primary Color',
+ name: 'changePrimaryColor', locale: _localeName);
+ String changeAccentColor() => Intl.message('Accent Color',
+ name: 'changeAccentColor', locale: _localeName);
+ String changeDarkTheme() =>
+ Intl.message('Dark Theme', name: 'changeDarkTheme', locale: _localeName);
+ String changeAccentTextColor() => Intl.message('Dark Icons',
+ name: 'changeAccentTextColor', locale: _localeName);
+ String autoSync() =>
+ Intl.message('Auto-Sync', name: 'autoSync', locale: _localeName);
+ String changePasswordButton() => Intl.message('CHANGE PASSWORD',
+ name: 'changePasswordButton', locale: _localeName);
+ String oldPassword() => Intl.message('Current password',
+ name: 'currentPassword', locale: _localeName);
String oldPasswordHint() =>
- Intl.message('Current password that should be changed', name: 'currentPasswordHint', locale: _localeName);
- String newPassword() => Intl.message('New password', name: 'newPassword', locale: _localeName);
- String newPasswordHint() =>
- Intl.message('The new password you have chosen', name: 'newPasswordHint', locale: _localeName);
- String new2Password() => Intl.message('Repeat new password', name: 'repeatNewPassword', locale: _localeName);
+ Intl.message('Current password that should be changed',
+ name: 'currentPasswordHint', locale: _localeName);
+ String newPassword() =>
+ Intl.message('New password', name: 'newPassword', locale: _localeName);
+ String newPasswordHint() => Intl.message('The new password you have chosen',
+ name: 'newPasswordHint', locale: _localeName);
+ String new2Password() => Intl.message('Repeat new password',
+ name: 'repeatNewPassword', locale: _localeName);
String new2PasswordHint() =>
- Intl.message('repeat the new password you have chosen', name: 'repeatNewPasswordHint', locale: _localeName);
- String changePasswordPD() => Intl.message('Change Password', name: 'changePasswordPD', locale: _localeName);
- String successful() => Intl.message('Successful', name: 'successful', locale: _localeName);
- String passwordSet() => Intl.message('Your password has been set', name: 'passwordSet', locale: _localeName);
- String tokenExpired() => Intl.message('Token expired', name: 'tokenExpired', locale: _localeName);
+ Intl.message('repeat the new password you have chosen',
+ name: 'repeatNewPasswordHint', locale: _localeName);
+ String changePasswordPD() => Intl.message('Change Password',
+ name: 'changePasswordPD', locale: _localeName);
+ String successful() =>
+ Intl.message('Successful', name: 'successful', locale: _localeName);
+ String passwordSet() => Intl.message('Your password has been set',
+ name: 'passwordSet', locale: _localeName);
+ String tokenExpired() =>
+ Intl.message('Token expired', name: 'tokenExpired', locale: _localeName);
String tokenExpiredExplanation() => Intl.message(
'Your token has expired. Login is required. If this happends multiple times per month, please contact us.',
name: 'tokenExpiredExplanation',
locale: _localeName);
- String noListLoaded() => Intl.message('No List Loaded', name: 'noListLoaded', locale: _localeName);
- String renameListItem() => Intl.message('Rename Product', name: 'renameListItem', locale: _localeName);
- String renameListItemHint() =>
- Intl.message('The new name of the product', name: 'renameListItemHint', locale: _localeName);
- String renameListItemLabel() => Intl.message('new product name', name: 'renameListItemLabel', locale: _localeName);
- String discardNewTheme() => Intl.message('Discard new theme?', name: 'discardNewTheme', locale: _localeName);
- String forgotPassword() => Intl.message('Forgot password?', name: 'forgotPassword', locale: _localeName);
- String bePatient() => Intl.message('Please be patient, the server is processing your request already',
- name: 'bePatient', locale: _localeName);
- String logout() => Intl.message('Logout', name: 'logout', locale: _localeName);
- String deleteListTitle() => Intl.message('Delete List', name: 'deleteListTitle', locale: _localeName);
- String deleteListText() => Intl.message('Do you really want to delete the list? This CAN\'T be undone!',
- name: 'deleteListText', locale: _localeName);
- String exportAsPdf() => Intl.message('Export as PDF', name: 'exportAsPdf', locale: _localeName);
- String boughtProducts() => Intl.message('Bought Products', name: 'boughtProducts', locale: _localeName);
- String nothingBoughtYet() => Intl.message('Nothing bought yet', name: 'nothingBoughtYet', locale: _localeName);
- String reorderItems() => Intl.message('Reorder', name: 'reorderItems', locale: _localeName);
+ String noListLoaded() =>
+ Intl.message('No List Loaded', name: 'noListLoaded', locale: _localeName);
+ String renameListItem() => Intl.message('Rename Product',
+ name: 'renameListItem', locale: _localeName);
+ String renameListItemHint() => Intl.message('The new name of the product',
+ name: 'renameListItemHint', locale: _localeName);
+ String renameListItemLabel() => Intl.message('new product name',
+ name: 'renameListItemLabel', locale: _localeName);
+ String discardNewTheme() => Intl.message('Discard new theme?',
+ name: 'discardNewTheme', locale: _localeName);
+ String forgotPassword() => Intl.message('Forgot password?',
+ name: 'forgotPassword', locale: _localeName);
+ String bePatient() => Intl.message(
+ 'Please be patient, the server is processing your request already',
+ name: 'bePatient',
+ locale: _localeName);
+ String logout() =>
+ Intl.message('Logout', name: 'logout', locale: _localeName);
+ String deleteListTitle() =>
+ Intl.message('Delete List', name: 'deleteListTitle', locale: _localeName);
+ String deleteListText() => Intl.message(
+ 'Do you really want to delete the list? This CAN\'T be undone!',
+ name: 'deleteListText',
+ locale: _localeName);
+ String exportAsPdf() =>
+ Intl.message('Export as PDF', name: 'exportAsPdf', locale: _localeName);
+ String boughtProducts() => Intl.message('Bought Products',
+ name: 'boughtProducts', locale: _localeName);
+ String nothingBoughtYet() => Intl.message('Nothing bought yet',
+ name: 'nothingBoughtYet', locale: _localeName);
+ String reorderItems() =>
+ Intl.message('Reorder', name: 'reorderItems', locale: _localeName);
- String refresh() => Intl.message('Refresh', name: "refresh", locale: _localeName);
- String settings() => Intl.message('Settings', name: "settings", locale: _localeName);
+ String refresh() =>
+ Intl.message('Refresh', name: "refresh", locale: _localeName);
+ String settings() =>
+ Intl.message('Settings', name: "settings", locale: _localeName);
String about() => Intl.message('About', name: "about", locale: _localeName);
- String codeOnGithub() => Intl.message('View Source Code on GitHub', name: "codeOnGithub", locale: _localeName);
- String playstoreEntry() => Intl.message('Entry on Play Store', name: "playstoreEntry", locale: _localeName);
- String iconSource() => Intl.message('Source of the App Icon', name: "iconSource", locale: _localeName);
+ String codeOnGithub() => Intl.message('View Source Code on GitHub',
+ name: "codeOnGithub", locale: _localeName);
+ String playstoreEntry() => Intl.message('Entry on Play Store',
+ name: "playstoreEntry", locale: _localeName);
+ String iconSource() => Intl.message('Source of the App Icon',
+ name: "iconSource", locale: _localeName);
String scanditCredit() =>
- Intl.message('has provided the Scanner for this App', name: "scanditCredit", locale: _localeName);
+ Intl.message('has provided the Scanner for this App',
+ name: "scanditCredit", locale: _localeName);
String aboutText() => Intl.message(
'Forged over many years with the only intention to make it easier for multiple people to plan their shopping and add their favorite products via camera in an unmatched speed.',
name: "aboutText",
locale: _localeName);
String freeText() =>
- Intl.message('Free of charge, no Advertisments, forever!', name: "freeText", locale: _localeName);
- String questionsErrors() => Intl.message('Questions, Errors or everything else can be send by a GitHub issue.',
- name: "questionsErrors", locale: _localeName);
- String okayButton() => Intl.message('OKAY', name: "okayButton", locale: _localeName);
- String requestPasswordResetButton() =>
- Intl.message('REQUEST PASSWORD RESET', name: 'requestPasswordResetButton', locale: _localeName);
- String requestPasswordResetTitle() =>
- Intl.message('Password Reset', name: "requestPasswordResetTitle", locale: _localeName);
+ Intl.message('Free of charge, no Advertisments, forever!',
+ name: "freeText", locale: _localeName);
+ String questionsErrors() => Intl.message(
+ 'Questions, Errors or everything else can be send by a GitHub issue.',
+ name: "questionsErrors",
+ locale: _localeName);
+ String okayButton() =>
+ Intl.message('OKAY', name: "okayButton", locale: _localeName);
+ String requestPasswordResetButton() => Intl.message('REQUEST PASSWORD RESET',
+ name: 'requestPasswordResetButton', locale: _localeName);
+ String requestPasswordResetTitle() => Intl.message('Password Reset',
+ name: "requestPasswordResetTitle", locale: _localeName);
String requestPasswordResetSuccess() => Intl.message(
'If the email exists, the password request was successfully requested. Further instructions can be found in the email, that was send to the address.',
name: "requestPasswordResetSuccess",
locale: _localeName);
+ String useMaterial3() =>
+ Intl.message('Use Material Design 3 (Colors based on Android Version)',
+ name: 'useMaterial3', locale: _localeName);
+ String elevateAppBar() => Intl.message('Colorize Title Background',
+ name: 'elevateAppBar', locale: _localeName);
//String openAppDrawerTooltip() => Intl.message('Open navigation menu', name: 'openNavigationMenu', locale: _localeName);
}
diff --git a/lib/main.dart b/lib/main.dart
index 2d0492f..481e128 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,10 +1,8 @@
import 'dart:convert';
-import 'dart:io';
import 'dart:ui';
import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
-import 'package:flutter/foundation.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:nssl/options/themes.dart';
import 'package:nssl/pages/forgot_password.dart';
@@ -17,56 +15,81 @@ import 'package:nssl/localization/nssl_strings.dart';
import 'package:nssl/firebase/cloud_messsaging.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:flutter_riverpod/legacy.dart';
// import 'package:shared_preferences/shared_preferences.dart';
class CustomScrollBehavior extends MaterialScrollBehavior {
@override
Set get dragDevices => {
- PointerDeviceKind.touch,
- PointerDeviceKind.mouse,
- PointerDeviceKind.stylus,
- };
+ PointerDeviceKind.touch,
+ PointerDeviceKind.mouse,
+ PointerDeviceKind.stylus,
+ };
}
@pragma('vm:entry-point')
Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Startup.initializeMinFunction();
- var dir = await Startup.fs.systemTempDirectory.childDirectory("message").create();
+ var dir = await Startup.fs.systemTempDirectory
+ .childDirectory("message")
+ .create();
var file = dir.childFile(DateTime.now().microsecondsSinceEpoch.toString());
await file.writeAsString(jsonEncode(message.data));
}
-final appRestartProvider = StateProvider(
- (ref) => 0,
-);
+final appRestartProvider = StateProvider((ref) => 0);
Future main() async {
-// iWonderHowLongThisTakes();
- runApp(ProviderScope(child: Consumer(
- builder: (context, ref, child) {
- return FutureBuilder(
- builder: (c, t) {
- if (t.connectionState == ConnectionState.done) {
- ref.watch(appRestartProvider);
- return NSSLPage();
- } else
- return MaterialApp(
- builder: (context, child) {
- return Center(
- child: SizedBox(
- height: 200,
- width: 200,
- child: SvgPicture.asset("assets/vectors/app_icon.svg"),
- ),
- );
+ // iWonderHowLongThisTakes();
+ runApp(
+ ProviderScope(
+ child: Consumer(
+ builder: (context, ref, child) {
+ return EagerInitialize(
+ FutureBuilder(
+ builder: (c, t) {
+ if (t.connectionState == ConnectionState.done) {
+ ref.watch(appRestartProvider);
+ return NSSLPage();
+ } else
+ return MaterialApp(
+ builder: (context, child) {
+ return Center(
+ child: SizedBox(
+ height: 200,
+ width: 200,
+ child: SvgPicture.asset(
+ "assets/vectors/app_icon.svg",
+ ),
+ ),
+ );
+ },
+ );
},
- );
+ future: Startup.initialize(ref).then(
+ (value) => FirebaseMessaging.onBackgroundMessage(
+ _firebaseMessagingBackgroundHandler,
+ ),
+ ),
+ ),
+ );
},
- future: Startup.initialize(ref)
- .then((value) => FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler)),
- );
- },
- )));
+ ),
+ ),
+ );
+}
+
+class EagerInitialize extends ConsumerWidget {
+ final Widget child;
+
+ const EagerInitialize(this.child);
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ ref.watch(themeProvider);
+ ref.watch(cloudMessagingProvider);
+
+ return child;
+ }
}
class NSSL extends StatelessWidget {
@@ -94,14 +117,13 @@ class _NSSLState extends ConsumerState {
@override
void initState() {
super.initState();
- ref.read(cloudMessagingProvider); //Neded for ref on onMessage
subscribeFirebase(context);
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
- CloudMessaging.onMessage(message);
+ ref.read(cloudMessagingProvider.notifier).onMessage(message);
});
FirebaseMessaging.onMessage.listen((event) {
- CloudMessaging.onMessage(event);
+ ref.read(cloudMessagingProvider.notifier).onMessage(event);
});
for (var list in ref.read(shoppingListsProvider).shoppingLists)
@@ -110,11 +132,10 @@ class _NSSLState extends ConsumerState {
Future subscribeFirebase(BuildContext context) async {
if (!Startup.firebaseSupported()) return;
-
var initMessage = await FirebaseMessaging.instance.getInitialMessage();
if (initMessage != null) {
- CloudMessaging.onMessage(initMessage);
+ ref.read(cloudMessagingProvider.notifier).onMessage(initMessage);
}
}
@@ -156,14 +177,16 @@ class _NSSLState extends ConsumerState {
}
Scaffold mainAppHome() => Scaffold(
- key: _mainScaffoldKey, resizeToAvoidBottomInset: false, body: MainPage() //CustomThemePage()//LoginPage(),
- );
+ key: _mainScaffoldKey,
+ resizeToAvoidBottomInset: false,
+ body: MainPage(), //CustomThemePage()//LoginPage(),
+ );
Scaffold mainAppLoginRegister() => Scaffold(
- key: _mainScaffoldKey,
- resizeToAvoidBottomInset: false,
- body: LoginPage(),
- );
+ key: _mainScaffoldKey,
+ resizeToAvoidBottomInset: false,
+ body: LoginPage(),
+ );
}
class _NSSLLocalizationsDelegate extends LocalizationsDelegate {
diff --git a/lib/manager/database_manager.dart b/lib/manager/database_manager.dart
index 671fedc..a1cf8bd 100644
--- a/lib/manager/database_manager.dart
+++ b/lib/manager/database_manager.dart
@@ -105,6 +105,38 @@ class FakeDatabase extends Database {
{String? where, List