Daily commit
This commit is contained in:
1
.idea/App-Gaslieferung.iml
generated
1
.idea/App-Gaslieferung.iml
generated
@ -11,5 +11,6 @@
|
|||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
<orderEntry type="library" name="Dart Packages" level="project" />
|
||||||
|
<orderEntry type="library" name="Flutter Plugins" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
512
.idea/libraries/Dart_Packages.xml
generated
512
.idea/libraries/Dart_Packages.xml
generated
@ -2,6 +2,55 @@
|
|||||||
<library name="Dart Packages" type="DartPackagesLibraryType">
|
<library name="Dart Packages" type="DartPackagesLibraryType">
|
||||||
<properties>
|
<properties>
|
||||||
<option name="packageNameToDirsMap">
|
<option name="packageNameToDirsMap">
|
||||||
|
<entry key="_fe_analyzer_shared">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-93.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="analyzer">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-10.0.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="app_links">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/app_links-7.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="app_links_linux">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_linux-1.0.3/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="app_links_platform_interface">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_platform_interface-2.0.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="app_links_web">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_web-1.0.4/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="args">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.7.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="async">
|
<entry key="async">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -23,6 +72,48 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="build">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/build-4.0.4/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="build_config">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/build_config-1.2.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="build_daemon">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/build_daemon-4.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="build_runner">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/build_runner-2.10.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="built_collection">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/built_collection-5.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="built_value">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/built_value-8.12.3/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="characters">
|
<entry key="characters">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -30,6 +121,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="checked_yaml">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/checked_yaml-2.0.4/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="clock">
|
<entry key="clock">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -37,6 +135,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="code_builder">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/code_builder-4.11.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="collection">
|
<entry key="collection">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -44,6 +149,20 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="convert">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="crypto">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.7/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="cupertino_icons">
|
<entry key="cupertino_icons">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -51,6 +170,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="dart_style">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-3.1.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="fake_async">
|
<entry key="fake_async">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -58,6 +184,27 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="ffi">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.1.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="file">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="fixnum">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="flutter">
|
<entry key="flutter">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -65,6 +212,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="flutter_bloc">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_bloc-9.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="flutter_lints">
|
<entry key="flutter_lints">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -79,6 +233,83 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="flutter_web_plugins">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/flutter/flutter/packages/flutter_web_plugins/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="glob">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.3/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="graphs">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/graphs-2.3.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="gtk">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/gtk-2.1.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="http">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http-1.6.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="http_multi_server">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="http_parser">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.1.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="io">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="json_annotation">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/json_annotation-4.10.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="json_schema">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/json_schema-5.2.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="json_serializable">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/json_serializable-6.12.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="leak_tracker">
|
<entry key="leak_tracker">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -107,6 +338,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="logging">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.3.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="matcher">
|
<entry key="matcher">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -128,6 +366,27 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="mime">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/mime-2.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="nested">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/nested-1.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="package_config">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.2.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="path">
|
<entry key="path">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -135,6 +394,69 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="plugin_platform_interface">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="pool">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="provider">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/provider-6.1.5+1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="pub_semver">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.2.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="pubspec_parse">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pubspec_parse-1.5.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="quiver">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/quiver-3.2.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="rfc_6901">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/rfc_6901-0.2.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="shelf">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="shelf_web_socket">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-3.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="sky_engine">
|
<entry key="sky_engine">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -142,6 +464,20 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="source_gen">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_gen-4.2.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="source_helper">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_helper-1.3.10/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="source_span">
|
<entry key="source_span">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -163,6 +499,13 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="stream_transform">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="string_scanner">
|
<entry key="string_scanner">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -184,6 +527,76 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="typed_data">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.4.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="uri">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/uri-1.0.0/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.3.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_android">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_ios">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.6/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_linux">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_macos">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_platform_interface">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.3.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_web">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="url_launcher_windows">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="vector_math">
|
<entry key="vector_math">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
@ -198,37 +611,136 @@
|
|||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="watcher">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.2.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="web">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web-1.1.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="web_socket">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket-1.0.1/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="web_socket_channel">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.3/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="yaml">
|
||||||
|
<value>
|
||||||
|
<list>
|
||||||
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.3/lib" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
</option>
|
</option>
|
||||||
</properties>
|
</properties>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-93.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-10.0.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links-7.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_linux-1.0.3/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_platform_interface-2.0.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_web-1.0.4/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.7.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.13.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/bloc-9.2.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/bloc-9.2.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/build-4.0.4/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/build_config-1.2.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/build_daemon-4.1.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/build_runner-2.10.5/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/built_collection-5.1.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/built_value-8.12.3/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/characters-1.4.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/checked_yaml-2.0.4/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/clock-1.1.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/code_builder-4.11.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.19.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.19.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.7/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-3.1.5/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.3/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.3/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.1.5/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_bloc-9.1.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_lints-6.0.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_lints-6.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.3/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/graphs-2.3.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/gtk-2.1.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http-1.6.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.1.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.5/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_annotation-4.10.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_schema-5.2.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/json_serializable-6.12.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lints-6.1.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lints-6.1.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.3.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.17/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.17/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.17.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.17.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-2.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/nested-1.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.2.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.9.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.9.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/provider-6.1.5+1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.2.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pubspec_parse-1.5.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/quiver-3.2.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/rfc_6901-0.2.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-3.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_gen-4.2.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_helper-1.3.10/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.7.7/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.7.7/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.4.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uri-1.0.0/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.3.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.6/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.3.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.2.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.2.0/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-15.0.2/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-15.0.2/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.2.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web-1.1.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket-1.0.1/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.3/lib" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.3/lib" />
|
||||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/pkg/sky_engine/lib" />
|
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/pkg/sky_engine/lib" />
|
||||||
<root url="file://$USER_HOME$/flutter/flutter/packages/flutter/lib" />
|
<root url="file://$USER_HOME$/flutter/flutter/packages/flutter/lib" />
|
||||||
<root url="file://$USER_HOME$/flutter/flutter/packages/flutter_test/lib" />
|
<root url="file://$USER_HOME$/flutter/flutter/packages/flutter_test/lib" />
|
||||||
|
<root url="file://$USER_HOME$/flutter/flutter/packages/flutter_web_plugins/lib" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
|
|||||||
14
.idea/libraries/Flutter_Plugins.xml
generated
14
.idea/libraries/Flutter_Plugins.xml
generated
@ -1,6 +1,18 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
|
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
|
||||||
<CLASSES />
|
<CLASSES>
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links-7.0.0" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_linux-1.0.3" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/app_links_web-1.0.4" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/gtk-2.1.0" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.6" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.3.2" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2" />
|
||||||
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5" />
|
||||||
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
</library>
|
</library>
|
||||||
|
|||||||
@ -24,6 +24,20 @@
|
|||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<!-- Bestehende Intent-Filter bleiben -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<!-- Füge diesen Intent-Filter hinzu -->
|
||||||
|
<intent-filter android:autoVerify="true">
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="myapp" android:host="callback" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 715 KiB |
BIN
assets/graphics/truck.png
Normal file
BIN
assets/graphics/truck.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 265 KiB |
@ -45,5 +45,19 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>myapp</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>myapp</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
82
lib/bloc/authentication/auth_bloc.dart
Normal file
82
lib/bloc/authentication/auth_bloc.dart
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_event.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_state.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/message_wrapper/message_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/message_wrapper/message_event.dart';
|
||||||
|
import 'package:app_links/app_links.dart';
|
||||||
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../exceptions/login.dart';
|
||||||
|
import '../../util/login.dart';
|
||||||
|
|
||||||
|
class AuthBloc extends Bloc<AuthEvent, AuthState> {
|
||||||
|
final _appLinks = AppLinks();
|
||||||
|
final MessageBloc msgBloc;
|
||||||
|
final String url;
|
||||||
|
|
||||||
|
AuthBloc({required this.url, required this.msgBloc}) : super(UnauthenticatedState()) {
|
||||||
|
on<AuthLoginEvent>(_onLoginEvent);
|
||||||
|
on<AuthLogoutEvent>(_onLogoutEvent);
|
||||||
|
on<AuthFailedEvent>(_onFailedEvent);
|
||||||
|
on<AuthLoginSuccessEvent>(_onLoginSuccessEvent);
|
||||||
|
|
||||||
|
_initDeepLinks();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _initDeepLinks() async {
|
||||||
|
// Listen to the stream if any further deeplink is coming in.
|
||||||
|
_appLinks.uriLinkStream.listen((uri) {
|
||||||
|
_handleDeepLink(uri);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Handle Deeplink if login request is coming in.
|
||||||
|
void _handleDeepLink(Uri uri) {
|
||||||
|
if (state is UnauthenticatedState) {
|
||||||
|
try {
|
||||||
|
add(AuthLoginSuccessEvent(getSessionIdFromUrl(uri)));
|
||||||
|
} on LoginInvalidUrlException catch (e) {
|
||||||
|
msgBloc.add(MessageShow(message: e.toString()));
|
||||||
|
} on LoginNoSessionIdException catch (e) {
|
||||||
|
msgBloc.add(MessageShow(message: e.toString()));
|
||||||
|
} catch (e, st) {
|
||||||
|
debugPrint("Fehler beim Login. Stacktrace: $st");
|
||||||
|
debugPrint("Fehler beim Login. Message: $e");
|
||||||
|
|
||||||
|
add(
|
||||||
|
AuthFailedEvent(
|
||||||
|
message:
|
||||||
|
"Es ist ein unbekannter Fehler aufgetreten. Versuchen Sie es später erneut oder wenden Sie sich an die Zentrale.",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// TODO: handle message if user is already logged in
|
||||||
|
debugPrint("NOT STATE");
|
||||||
|
debugPrint("$state");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onLoginSuccessEvent(
|
||||||
|
AuthLoginSuccessEvent event,
|
||||||
|
Emitter<AuthState> emit,
|
||||||
|
) {
|
||||||
|
emit(AuthenticatedState(sessionId: event.sessionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onLoginEvent(AuthLoginEvent event, Emitter<AuthState> emit) async {
|
||||||
|
await launchUrl(
|
||||||
|
Uri.parse(url),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onLogoutEvent(AuthLogoutEvent event, Emitter<AuthState> emit) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onFailedEvent(AuthFailedEvent event, Emitter<AuthState> emit) {
|
||||||
|
emit(UnauthenticatedState());
|
||||||
|
}
|
||||||
|
}
|
||||||
17
lib/bloc/authentication/auth_event.dart
Normal file
17
lib/bloc/authentication/auth_event.dart
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
abstract class AuthEvent {}
|
||||||
|
|
||||||
|
class AuthLoginEvent extends AuthEvent {}
|
||||||
|
|
||||||
|
class AuthLoginSuccessEvent extends AuthEvent {
|
||||||
|
String sessionId;
|
||||||
|
|
||||||
|
AuthLoginSuccessEvent(this.sessionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
class AuthLogoutEvent extends AuthEvent {}
|
||||||
|
|
||||||
|
class AuthFailedEvent extends AuthEvent {
|
||||||
|
String message;
|
||||||
|
|
||||||
|
AuthFailedEvent({required this.message});
|
||||||
|
}
|
||||||
17
lib/bloc/authentication/auth_state.dart
Normal file
17
lib/bloc/authentication/auth_state.dart
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
abstract class AuthState {}
|
||||||
|
|
||||||
|
class AuthInitialState extends AuthState {}
|
||||||
|
|
||||||
|
class UnauthenticatedState extends AuthState {}
|
||||||
|
|
||||||
|
class AuthenticatedState extends AuthState {
|
||||||
|
String sessionId;
|
||||||
|
|
||||||
|
AuthenticatedState({required this.sessionId});
|
||||||
|
}
|
||||||
|
|
||||||
|
class AuthFailedState extends AuthState {
|
||||||
|
String message;
|
||||||
|
|
||||||
|
AuthFailedState({required this.message});
|
||||||
|
}
|
||||||
21
lib/bloc/message_wrapper/message_bloc.dart
Normal file
21
lib/bloc/message_wrapper/message_bloc.dart
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:bloc/bloc.dart';
|
||||||
|
|
||||||
|
import 'message_event.dart';
|
||||||
|
import 'message_state.dart';
|
||||||
|
|
||||||
|
class MessageBloc extends Bloc<MessageEvent, MessageState> {
|
||||||
|
MessageBloc() : super(MessageInitialState()) {
|
||||||
|
on<MessageShow>(_show);
|
||||||
|
on<MessageHide>(_hide);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _show(MessageShow event, Emitter<MessageState> emit) async {
|
||||||
|
emit(MessageShowState(message: event.message));
|
||||||
|
await Future.delayed(event.duration);
|
||||||
|
emit(MessageHideState());
|
||||||
|
}
|
||||||
|
|
||||||
|
void _hide(MessageHide event, Emitter<MessageState> emit) {
|
||||||
|
emit(MessageHideState());
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lib/bloc/message_wrapper/message_event.dart
Normal file
10
lib/bloc/message_wrapper/message_event.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
abstract class MessageEvent {}
|
||||||
|
|
||||||
|
class MessageShow extends MessageEvent {
|
||||||
|
String message;
|
||||||
|
Duration duration;
|
||||||
|
|
||||||
|
MessageShow({required this.message}) : duration = Duration(seconds: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
class MessageHide extends MessageEvent {}
|
||||||
7
lib/bloc/message_wrapper/message_state.dart
Normal file
7
lib/bloc/message_wrapper/message_state.dart
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
abstract class MessageState {}
|
||||||
|
class MessageInitialState extends MessageState {}
|
||||||
|
class MessageShowState extends MessageState {
|
||||||
|
String message;
|
||||||
|
MessageShowState({required this.message});
|
||||||
|
}
|
||||||
|
class MessageHideState extends MessageState {}
|
||||||
25
lib/bloc/tour/tour_bloc.dart
Normal file
25
lib/bloc/tour/tour_bloc.dart
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import 'package:app_gaslieferung/repository/tour_repository.dart';
|
||||||
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
import 'tour_event.dart';
|
||||||
|
import 'tour_state.dart';
|
||||||
|
|
||||||
|
class TourBloc extends Bloc<TourEvent, TourState> {
|
||||||
|
TourRepository tour;
|
||||||
|
|
||||||
|
TourBloc({required this.tour}) : super(TourInitial()) {
|
||||||
|
on<TourLoadEvent>(_onTourLoadEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onTourLoadEvent(TourLoadEvent event, Emitter<TourState> emit) async {
|
||||||
|
emit(TourLoading());
|
||||||
|
try {
|
||||||
|
final tour = await this.tour.getTour(event.sessionId, event.carId);
|
||||||
|
emit(TourLoaded(tour: tour));
|
||||||
|
} catch (e, st) {
|
||||||
|
debugPrint(st.toString());
|
||||||
|
emit(TourLoadingFailed(message: e.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8
lib/bloc/tour/tour_event.dart
Normal file
8
lib/bloc/tour/tour_event.dart
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
abstract class TourEvent {}
|
||||||
|
|
||||||
|
class TourLoadEvent extends TourEvent {
|
||||||
|
String carId;
|
||||||
|
String sessionId;
|
||||||
|
|
||||||
|
TourLoadEvent({required this.carId, required this.sessionId});
|
||||||
|
}
|
||||||
20
lib/bloc/tour/tour_state.dart
Normal file
20
lib/bloc/tour/tour_state.dart
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import 'package:app_gaslieferung/model/delivery.dart';
|
||||||
|
import 'package:app_gaslieferung/model/tour.dart';
|
||||||
|
|
||||||
|
abstract class TourState {}
|
||||||
|
|
||||||
|
class TourInitial extends TourState {}
|
||||||
|
|
||||||
|
class TourLoaded extends TourState {
|
||||||
|
Tour tour;
|
||||||
|
|
||||||
|
TourLoaded({required this.tour});
|
||||||
|
}
|
||||||
|
|
||||||
|
class TourLoading extends TourState {}
|
||||||
|
|
||||||
|
class TourLoadingFailed extends TourState {
|
||||||
|
String message;
|
||||||
|
|
||||||
|
TourLoadingFailed({required this.message});
|
||||||
|
}
|
||||||
@ -1,14 +1,27 @@
|
|||||||
import 'package:app_gaslieferung/repository/tour_select_repository.dart';
|
import 'package:app_gaslieferung/model/car.dart';
|
||||||
|
import 'package:app_gaslieferung/repository/tour_repository.dart';
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'event.dart';
|
import 'event.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class TourSelectBloc extends Bloc<TourSelectEvent, TourSelectState> {
|
class TourSelectBloc extends Bloc<TourSelectEvent, TourSelectState> {
|
||||||
TourSelectRepository repository;
|
TourRepository repository;
|
||||||
|
|
||||||
TourSelectBloc({required this.repository}) : super(TourSelectInitial()) {
|
TourSelectBloc({required this.repository}) : super(TourSelectInitial()) {
|
||||||
on<TourSelectEvent>((event, emit) {
|
on<TourSelectLoadMetadataEvent>(_onTourSelectLoadCarsEvent);
|
||||||
// TODO: handle event
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
void _onTourSelectLoadCarsEvent(
|
||||||
|
TourSelectLoadMetadataEvent event,
|
||||||
|
Emitter<TourSelectState> emit,
|
||||||
|
) async {
|
||||||
|
emit(TourSelectLoading());
|
||||||
|
try {
|
||||||
|
emit(TourSelectLoaded(data: await repository.getSupplierTourMetadata(event.sessionId)));
|
||||||
|
} catch (e,st) {
|
||||||
|
debugPrint("Error on loading cars: $e\n$st");
|
||||||
|
emit(TourSelectError(message: "Es ist ein unbekannter Fehler aufgetreten. Versuchen Sie es erneut."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
abstract class TourSelectEvent {}
|
abstract class TourSelectEvent {}
|
||||||
|
|
||||||
class TourSelectLoadingEvent extends TourSelectEvent {}
|
class TourSelectLoadMetadataEvent extends TourSelectEvent {
|
||||||
class TourSelectLoadedEvent extends TourSelectEvent {}
|
String sessionId;
|
||||||
class TourSelectErrorEvent extends TourSelectEvent {}
|
|
||||||
|
TourSelectLoadMetadataEvent({required this.sessionId});
|
||||||
|
}
|
||||||
@ -1,3 +1,19 @@
|
|||||||
|
import 'package:app_gaslieferung/model/supplier.dart';
|
||||||
|
|
||||||
abstract class TourSelectState {}
|
abstract class TourSelectState {}
|
||||||
|
|
||||||
class TourSelectInitial extends TourSelectState {}
|
class TourSelectInitial extends TourSelectState {}
|
||||||
|
|
||||||
|
class TourSelectLoading extends TourSelectState {}
|
||||||
|
|
||||||
|
class TourSelectLoaded extends TourSelectState {
|
||||||
|
SupplierTourMetadata data;
|
||||||
|
|
||||||
|
TourSelectLoaded({required this.data});
|
||||||
|
}
|
||||||
|
|
||||||
|
class TourSelectError extends TourSelectState {
|
||||||
|
String message;
|
||||||
|
|
||||||
|
TourSelectError({required this.message});
|
||||||
|
}
|
||||||
|
|||||||
25
lib/dto/car_dto.dart
Normal file
25
lib/dto/car_dto.dart
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'car_dto.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class CarDTO {
|
||||||
|
@JsonKey(name: 'id')
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@JsonKey(name: 'driver_name')
|
||||||
|
final String? driverName;
|
||||||
|
|
||||||
|
@JsonKey(name: 'car_name')
|
||||||
|
final String carName;
|
||||||
|
|
||||||
|
CarDTO({
|
||||||
|
required this.id,
|
||||||
|
required this.carName,
|
||||||
|
required this.driverName,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory CarDTO.fromJson(Map<String, dynamic> json) => _$CarDTOFromJson(json);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$CarDTOToJson(this);
|
||||||
|
}
|
||||||
19
lib/dto/car_dto.g.dart
Normal file
19
lib/dto/car_dto.g.dart
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'car_dto.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
CarDTO _$CarDTOFromJson(Map<String, dynamic> json) => CarDTO(
|
||||||
|
id: (json['id'] as num).toInt(),
|
||||||
|
carName: json['car_name'] as String,
|
||||||
|
driverName: json['driver_name'] as String?,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$CarDTOToJson(CarDTO instance) => <String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'driver_name': instance.driverName,
|
||||||
|
'car_name': instance.carName,
|
||||||
|
};
|
||||||
20
lib/dto/delivery_dto.dart
Normal file
20
lib/dto/delivery_dto.dart
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
import 'car_dto.dart';
|
||||||
|
|
||||||
|
part 'delivery_dto.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable(explicitToJson: true)
|
||||||
|
class DeliveryDTO {
|
||||||
|
@JsonKey(name: 'amount_deliveries')
|
||||||
|
final int amountDeliveries;
|
||||||
|
|
||||||
|
final CarDTO car;
|
||||||
|
|
||||||
|
DeliveryDTO({
|
||||||
|
required this.amountDeliveries,
|
||||||
|
required this.car,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DeliveryDTO.fromJson(Map<String, dynamic> json) => _$DeliveryDTOFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$DeliveryDTOToJson(this);
|
||||||
|
}
|
||||||
18
lib/dto/delivery_dto.g.dart
Normal file
18
lib/dto/delivery_dto.g.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'delivery_dto.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
DeliveryDTO _$DeliveryDTOFromJson(Map<String, dynamic> json) => DeliveryDTO(
|
||||||
|
amountDeliveries: (json['amount_deliveries'] as num).toInt(),
|
||||||
|
car: CarDTO.fromJson(json['car'] as Map<String, dynamic>),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$DeliveryDTOToJson(DeliveryDTO instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'amount_deliveries': instance.amountDeliveries,
|
||||||
|
'car': instance.car.toJson(),
|
||||||
|
};
|
||||||
14
lib/dto/fail_response_dto.dart
Normal file
14
lib/dto/fail_response_dto.dart
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'fail_response_dto.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class FailResponseDTO {
|
||||||
|
int? code;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
FailResponseDTO({required this.message, required this.code});
|
||||||
|
|
||||||
|
factory FailResponseDTO.fromJson(Map<String, dynamic> json) => _$FailResponseDTOFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$FailResponseDTOToJson(this);
|
||||||
|
}
|
||||||
16
lib/dto/fail_response_dto.g.dart
Normal file
16
lib/dto/fail_response_dto.g.dart
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'fail_response_dto.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
FailResponseDTO _$FailResponseDTOFromJson(Map<String, dynamic> json) =>
|
||||||
|
FailResponseDTO(
|
||||||
|
message: json['message'] as String,
|
||||||
|
code: (json['code'] as num?)?.toInt(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$FailResponseDTOToJson(FailResponseDTO instance) =>
|
||||||
|
<String, dynamic>{'code': instance.code, 'message': instance.message};
|
||||||
19
lib/dto/get_deliveries_dto.dart
Normal file
19
lib/dto/get_deliveries_dto.dart
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
import 'delivery_dto.dart';
|
||||||
|
|
||||||
|
part 'get_deliveries_dto.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable(explicitToJson: true)
|
||||||
|
class GetDeliveriesDTO {
|
||||||
|
final List<DeliveryDTO> deliveries;
|
||||||
|
final String date;
|
||||||
|
|
||||||
|
GetDeliveriesDTO({
|
||||||
|
required this.deliveries,
|
||||||
|
required this.date
|
||||||
|
});
|
||||||
|
|
||||||
|
factory GetDeliveriesDTO.fromJson(Map<String, dynamic> json) => _$GetDeliveriesDTOFromJson(json);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$GetDeliveriesDTOToJson(this);
|
||||||
|
}
|
||||||
21
lib/dto/get_deliveries_dto.g.dart
Normal file
21
lib/dto/get_deliveries_dto.g.dart
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'get_deliveries_dto.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
GetDeliveriesDTO _$GetDeliveriesDTOFromJson(Map<String, dynamic> json) =>
|
||||||
|
GetDeliveriesDTO(
|
||||||
|
deliveries: (json['deliveries'] as List<dynamic>)
|
||||||
|
.map((e) => DeliveryDTO.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList(),
|
||||||
|
date: json['date'] as String,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$GetDeliveriesDTOToJson(GetDeliveriesDTO instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'deliveries': instance.deliveries.map((e) => e.toJson()).toList(),
|
||||||
|
'date': instance.date,
|
||||||
|
};
|
||||||
20
lib/exceptions/login.dart
Normal file
20
lib/exceptions/login.dart
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
class LoginInvalidUrlException implements Exception {
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "Invalid url";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoginNoSessionIdException implements Exception {
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "No session id found in url";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoginUnauthorizedException implements Exception {
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "Unauthorized";
|
||||||
|
}
|
||||||
|
}
|
||||||
8
lib/exceptions/server.dart
Normal file
8
lib/exceptions/server.dart
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
class ServerErrorException implements Exception {
|
||||||
|
final String message;
|
||||||
|
|
||||||
|
ServerErrorException({required this.message});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
|
}
|
||||||
@ -1,23 +1,55 @@
|
|||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/tour/tour_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/tour_select/bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/repository/tour_repository.dart';
|
||||||
|
import 'package:app_gaslieferung/service/tour_service.dart';
|
||||||
import 'package:app_gaslieferung/ui/page/login.dart';
|
import 'package:app_gaslieferung/ui/page/login.dart';
|
||||||
import 'package:app_gaslieferung/ui/theme/theme.dart';
|
import 'package:app_gaslieferung/ui/theme/theme.dart';
|
||||||
|
import 'package:app_gaslieferung/ui/widgets/message_wrapper/message_wrapper.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import 'bloc/message_wrapper/message_bloc.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(const MyApp());
|
runApp(GasDeliveryApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class GasDeliveryApp extends StatefulWidget {
|
||||||
const MyApp({super.key});
|
const GasDeliveryApp({super.key});
|
||||||
|
|
||||||
// This widget is the root of your application.
|
@override
|
||||||
|
State<StatefulWidget> createState() => _GasDeliveryAppState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _GasDeliveryAppState extends State<GasDeliveryApp> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MultiBlocProvider(
|
||||||
title: 'Flutter Demo',
|
providers: [
|
||||||
theme: AppTheme.light(),
|
BlocProvider(create: (context) => MessageBloc()),
|
||||||
darkTheme: AppTheme.dark(),
|
BlocProvider(
|
||||||
themeMode: ThemeMode.light, // oder ThemeMode.dark / light
|
create: (context) => AuthBloc(
|
||||||
home: const LoginPage(),
|
url: "http://127.0.0.1:3000/login",
|
||||||
|
msgBloc: context.read<MessageBloc>(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
BlocProvider(
|
||||||
|
create: (context) => TourBloc(
|
||||||
|
tour: TourRepository(
|
||||||
|
service: TourService(baseUrl: "http://127.0.0.1:3000"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
child: MaterialApp(
|
||||||
|
builder: (context, child) => MessageWrapperWidget(child: child!),
|
||||||
|
theme: AppTheme.light(),
|
||||||
|
darkTheme: AppTheme.dark(),
|
||||||
|
themeMode: ThemeMode.light,
|
||||||
|
// oder ThemeMode.dark / light
|
||||||
|
home: LoginPage(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,19 @@
|
|||||||
class Car {
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
String id;
|
|
||||||
String carName;
|
|
||||||
String? driverName;
|
|
||||||
|
|
||||||
Car({required this.id, required this.carName, this.driverName});
|
part 'car.g.dart';
|
||||||
}
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Car {
|
||||||
|
final int id;
|
||||||
|
final String carName;
|
||||||
|
final String? driverName;
|
||||||
|
|
||||||
|
Car({
|
||||||
|
required this.id,
|
||||||
|
required this.carName,
|
||||||
|
this.driverName,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Car.fromJson(Map<String, dynamic> json) => _$CarFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$CarToJson(this);
|
||||||
|
}
|
||||||
|
|||||||
19
lib/model/car.g.dart
Normal file
19
lib/model/car.g.dart
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'car.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
Car _$CarFromJson(Map<String, dynamic> json) => Car(
|
||||||
|
id: (json['id'] as num).toInt(),
|
||||||
|
carName: json['car_name'] as String,
|
||||||
|
driverName: json['driver_name'] as String?,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$CarToJson(Car instance) => <String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'car_name': instance.carName,
|
||||||
|
'driver_name': instance.driverName,
|
||||||
|
};
|
||||||
@ -7,13 +7,14 @@ class Delivery {
|
|||||||
|
|
||||||
DateTime? deliveredAt;
|
DateTime? deliveredAt;
|
||||||
DateTime? desiredDeliveryTime;
|
DateTime? desiredDeliveryTime;
|
||||||
String? driverInformation;
|
|
||||||
|
String? informationForDriver;
|
||||||
|
|
||||||
Delivery({
|
Delivery({
|
||||||
required this.receipt,
|
required this.receipt,
|
||||||
|
|
||||||
this.desiredDeliveryTime,
|
this.desiredDeliveryTime,
|
||||||
this.driverInformation,
|
this.informationForDriver,
|
||||||
this.deliveredAt
|
this.deliveredAt
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -16,3 +16,21 @@ class Supplier {
|
|||||||
required this.address,
|
required this.address,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Contains information about the cars the supplier has and how many
|
||||||
|
/// deliveries they have per car.
|
||||||
|
class SupplierTourMetadata {
|
||||||
|
String date;
|
||||||
|
|
||||||
|
/// The list of cars the supplier has and how many deliveries they have per car.
|
||||||
|
List<TourMetadata> tours;
|
||||||
|
|
||||||
|
SupplierTourMetadata({required this.date, required this.tours});
|
||||||
|
}
|
||||||
|
|
||||||
|
class TourMetadata {
|
||||||
|
Car car;
|
||||||
|
int amountDeliveries;
|
||||||
|
|
||||||
|
TourMetadata({required this.car, required this.amountDeliveries});
|
||||||
|
}
|
||||||
@ -1,10 +1,129 @@
|
|||||||
import 'supplier.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
import 'delivery.dart';
|
|
||||||
|
|
||||||
|
import 'car.dart';
|
||||||
|
|
||||||
|
part 'tour.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Article {
|
||||||
|
final int id;
|
||||||
|
final String title;
|
||||||
|
final int quantity;
|
||||||
|
final double pricePerQuantity;
|
||||||
|
final double depositPricePerQuantity;
|
||||||
|
final int quantityDelivered;
|
||||||
|
final int quantityReturned;
|
||||||
|
final int quantityToDeposit;
|
||||||
|
final int? referenceTo;
|
||||||
|
|
||||||
|
Article({
|
||||||
|
required this.id,
|
||||||
|
required this.title,
|
||||||
|
required this.quantity,
|
||||||
|
required this.pricePerQuantity,
|
||||||
|
required this.depositPricePerQuantity,
|
||||||
|
required this.quantityDelivered,
|
||||||
|
required this.quantityReturned,
|
||||||
|
required this.quantityToDeposit,
|
||||||
|
this.referenceTo,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Article.fromJson(Map<String, dynamic> json) => _$ArticleFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$ArticleToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Address {
|
||||||
|
final String street;
|
||||||
|
final String housingNumber;
|
||||||
|
final String postalCode;
|
||||||
|
final String city;
|
||||||
|
final String? country;
|
||||||
|
|
||||||
|
Address({
|
||||||
|
required this.street,
|
||||||
|
required this.housingNumber,
|
||||||
|
required this.postalCode,
|
||||||
|
required this.city,
|
||||||
|
this.country,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Address.fromJson(Map<String, dynamic> json) => _$AddressFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$AddressToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Customer {
|
||||||
|
final String name;
|
||||||
|
final int id;
|
||||||
|
final Address address;
|
||||||
|
|
||||||
|
Customer({
|
||||||
|
required this.name,
|
||||||
|
required this.id,
|
||||||
|
required this.address,
|
||||||
|
});
|
||||||
|
|
||||||
|
String get displayAddress => "${address.street} ${address.housingNumber}, ${address.postalCode} ${address.city}";
|
||||||
|
|
||||||
|
factory Customer.fromJson(Map<String, dynamic> json) => _$CustomerFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$CustomerToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Receipt {
|
||||||
|
final List<Article> articles;
|
||||||
|
final Customer customer;
|
||||||
|
final double totalGrossPrice;
|
||||||
|
final double totalNetPrice;
|
||||||
|
|
||||||
|
Receipt({
|
||||||
|
required this.articles,
|
||||||
|
required this.customer,
|
||||||
|
required this.totalGrossPrice,
|
||||||
|
required this.totalNetPrice,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Receipt.fromJson(Map<String, dynamic> json) => _$ReceiptFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$ReceiptToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
|
class Delivery {
|
||||||
|
final Receipt receipt;
|
||||||
|
final String informationForDriver;
|
||||||
|
final DateTime desiredDeliveryTime;
|
||||||
|
final DateTime? timeDelivered;
|
||||||
|
|
||||||
|
Delivery({
|
||||||
|
required this.receipt,
|
||||||
|
required this.informationForDriver,
|
||||||
|
required this.desiredDeliveryTime,
|
||||||
|
required this.timeDelivered,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Delivery.fromJson(Map<String, dynamic> json) => _$DeliveryFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$DeliveryToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||||
class Tour {
|
class Tour {
|
||||||
DateTime date;
|
final Car car;
|
||||||
Supplier supplier;
|
final String date;
|
||||||
List<Delivery> deliveries;
|
final List<Delivery> deliveries;
|
||||||
|
|
||||||
Tour({required this.date, required this.deliveries, required this.supplier});
|
Tour({
|
||||||
|
required this.car,
|
||||||
|
required this.date,
|
||||||
|
required this.deliveries,
|
||||||
|
});
|
||||||
|
|
||||||
|
int get amountDeliveries => deliveries.length;
|
||||||
|
int get amountFinishedDeliveries => deliveries.where((delivery) => delivery.timeDelivered != null).length;
|
||||||
|
int get amountDeliveriesLeft => amountDeliveries - amountFinishedDeliveries;
|
||||||
|
double get progress => amountFinishedDeliveries / amountDeliveries;
|
||||||
|
int get progressPercentage => (progress * 100).toInt();
|
||||||
|
|
||||||
|
factory Tour.fromJson(Map<String, dynamic> json) => _$TourFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$TourToJson(this);
|
||||||
}
|
}
|
||||||
106
lib/model/tour.g.dart
Normal file
106
lib/model/tour.g.dart
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'tour.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
Article _$ArticleFromJson(Map<String, dynamic> json) => Article(
|
||||||
|
id: (json['id'] as num).toInt(),
|
||||||
|
title: json['title'] as String,
|
||||||
|
quantity: (json['quantity'] as num).toInt(),
|
||||||
|
pricePerQuantity: (json['price_per_quantity'] as num).toDouble(),
|
||||||
|
depositPricePerQuantity: (json['deposit_price_per_quantity'] as num)
|
||||||
|
.toDouble(),
|
||||||
|
quantityDelivered: (json['quantity_delivered'] as num).toInt(),
|
||||||
|
quantityReturned: (json['quantity_returned'] as num).toInt(),
|
||||||
|
quantityToDeposit: (json['quantity_to_deposit'] as num).toInt(),
|
||||||
|
referenceTo: (json['reference_to'] as num?)?.toInt(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$ArticleToJson(Article instance) => <String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'title': instance.title,
|
||||||
|
'quantity': instance.quantity,
|
||||||
|
'price_per_quantity': instance.pricePerQuantity,
|
||||||
|
'deposit_price_per_quantity': instance.depositPricePerQuantity,
|
||||||
|
'quantity_delivered': instance.quantityDelivered,
|
||||||
|
'quantity_returned': instance.quantityReturned,
|
||||||
|
'quantity_to_deposit': instance.quantityToDeposit,
|
||||||
|
'reference_to': instance.referenceTo,
|
||||||
|
};
|
||||||
|
|
||||||
|
Address _$AddressFromJson(Map<String, dynamic> json) => Address(
|
||||||
|
street: json['street'] as String,
|
||||||
|
housingNumber: json['housing_number'] as String,
|
||||||
|
postalCode: json['postal_code'] as String,
|
||||||
|
city: json['city'] as String,
|
||||||
|
country: json['country'] as String?,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$AddressToJson(Address instance) => <String, dynamic>{
|
||||||
|
'street': instance.street,
|
||||||
|
'housing_number': instance.housingNumber,
|
||||||
|
'postal_code': instance.postalCode,
|
||||||
|
'city': instance.city,
|
||||||
|
'country': instance.country,
|
||||||
|
};
|
||||||
|
|
||||||
|
Customer _$CustomerFromJson(Map<String, dynamic> json) => Customer(
|
||||||
|
name: json['name'] as String,
|
||||||
|
id: (json['id'] as num).toInt(),
|
||||||
|
address: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$CustomerToJson(Customer instance) => <String, dynamic>{
|
||||||
|
'name': instance.name,
|
||||||
|
'id': instance.id,
|
||||||
|
'address': instance.address,
|
||||||
|
};
|
||||||
|
|
||||||
|
Receipt _$ReceiptFromJson(Map<String, dynamic> json) => Receipt(
|
||||||
|
articles: (json['articles'] as List<dynamic>)
|
||||||
|
.map((e) => Article.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList(),
|
||||||
|
customer: Customer.fromJson(json['customer'] as Map<String, dynamic>),
|
||||||
|
totalGrossPrice: (json['total_gross_price'] as num).toDouble(),
|
||||||
|
totalNetPrice: (json['total_net_price'] as num).toDouble(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$ReceiptToJson(Receipt instance) => <String, dynamic>{
|
||||||
|
'articles': instance.articles,
|
||||||
|
'customer': instance.customer,
|
||||||
|
'total_gross_price': instance.totalGrossPrice,
|
||||||
|
'total_net_price': instance.totalNetPrice,
|
||||||
|
};
|
||||||
|
|
||||||
|
Delivery _$DeliveryFromJson(Map<String, dynamic> json) => Delivery(
|
||||||
|
receipt: Receipt.fromJson(json['receipt'] as Map<String, dynamic>),
|
||||||
|
informationForDriver: json['information_for_driver'] as String,
|
||||||
|
desiredDeliveryTime: DateTime.parse(json['desired_delivery_time'] as String),
|
||||||
|
timeDelivered: json['time_delivered'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['time_delivered'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$DeliveryToJson(Delivery instance) => <String, dynamic>{
|
||||||
|
'receipt': instance.receipt,
|
||||||
|
'information_for_driver': instance.informationForDriver,
|
||||||
|
'desired_delivery_time': instance.desiredDeliveryTime.toIso8601String(),
|
||||||
|
'time_delivered': instance.timeDelivered?.toIso8601String(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Tour _$TourFromJson(Map<String, dynamic> json) => Tour(
|
||||||
|
car: Car.fromJson(json['car'] as Map<String, dynamic>),
|
||||||
|
date: json['date'] as String,
|
||||||
|
deliveries: (json['deliveries'] as List<dynamic>)
|
||||||
|
.map((e) => Delivery.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$TourToJson(Tour instance) => <String, dynamic>{
|
||||||
|
'car': instance.car,
|
||||||
|
'date': instance.date,
|
||||||
|
'deliveries': instance.deliveries,
|
||||||
|
};
|
||||||
39
lib/repository/tour_repository.dart
Normal file
39
lib/repository/tour_repository.dart
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import 'package:app_gaslieferung/model/supplier.dart';
|
||||||
|
import 'package:app_gaslieferung/model/tour.dart';
|
||||||
|
import 'package:app_gaslieferung/service/tour_service.dart';
|
||||||
|
|
||||||
|
import '../model/car.dart';
|
||||||
|
|
||||||
|
class TourRepository {
|
||||||
|
TourService service;
|
||||||
|
|
||||||
|
TourRepository({required this.service});
|
||||||
|
|
||||||
|
/// Lists the possible tours of cars existing for a supplier.
|
||||||
|
Future<SupplierTourMetadata> getSupplierTourMetadata(String sessionId) async {
|
||||||
|
final dto = await service.getCars(sessionId);
|
||||||
|
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
|
||||||
|
return SupplierTourMetadata(
|
||||||
|
date: dto.date,
|
||||||
|
tours: dto.deliveries
|
||||||
|
.map(
|
||||||
|
(delivery) => TourMetadata(
|
||||||
|
car: Car(id: delivery.car.id, carName: delivery.car.carName, driverName: delivery.car.driverName),
|
||||||
|
amountDeliveries: delivery.amountDeliveries,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Lists the possible tours of cars existing for a supplier.
|
||||||
|
Future<Tour> getTour(String sessionId, String carId) async {
|
||||||
|
final tour = await service.getTour(sessionId, carId);
|
||||||
|
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
|
||||||
|
return tour;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1 +0,0 @@
|
|||||||
class TourSelectRepository {}
|
|
||||||
49
lib/service/tour_service.dart
Normal file
49
lib/service/tour_service.dart
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:app_gaslieferung/dto/fail_response_dto.dart';
|
||||||
|
import 'package:app_gaslieferung/dto/get_deliveries_dto.dart';
|
||||||
|
import 'package:app_gaslieferung/exceptions/login.dart';
|
||||||
|
import 'package:app_gaslieferung/exceptions/server.dart';
|
||||||
|
import 'package:app_gaslieferung/model/tour.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
class TourService {
|
||||||
|
final String baseUrl;
|
||||||
|
|
||||||
|
TourService({required this.baseUrl});
|
||||||
|
|
||||||
|
Future<GetDeliveriesDTO> getCars(String sessionId) async {
|
||||||
|
final response = await http.get(
|
||||||
|
Uri.parse('$baseUrl/cars'),
|
||||||
|
headers: {'Cookie': 'session_id=$sessionId'},
|
||||||
|
);
|
||||||
|
|
||||||
|
int statusCode = response.statusCode;
|
||||||
|
if (statusCode == HttpStatus.unauthorized) {
|
||||||
|
throw LoginUnauthorizedException();
|
||||||
|
} else if (statusCode != HttpStatus.ok) {
|
||||||
|
final dto = FailResponseDTO.fromJson(jsonDecode(response.body));
|
||||||
|
throw ServerErrorException(message: dto.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetDeliveriesDTO.fromJson(jsonDecode(response.body));
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Tour> getTour(String sessionId, String carId) async {
|
||||||
|
final response = await http.get(
|
||||||
|
Uri.parse('$baseUrl/tour/$carId'),
|
||||||
|
headers: {'Cookie': 'session_id=$sessionId'},
|
||||||
|
);
|
||||||
|
|
||||||
|
int statusCode = response.statusCode;
|
||||||
|
if (statusCode == HttpStatus.unauthorized) {
|
||||||
|
throw LoginUnauthorizedException();
|
||||||
|
} else if (statusCode != HttpStatus.ok) {
|
||||||
|
final dto = FailResponseDTO.fromJson(jsonDecode(response.body));
|
||||||
|
throw ServerErrorException(message: dto.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Tour.fromJson(jsonDecode(response.body));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,17 @@
|
|||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_event.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_state.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/message_wrapper/message_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/message_wrapper/message_event.dart';
|
||||||
|
import 'package:app_gaslieferung/exceptions/login.dart';
|
||||||
|
import 'package:app_links/app_links.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
import '../../bloc/tour_select/bloc.dart';
|
||||||
|
import '../../repository/tour_repository.dart';
|
||||||
|
import '../../service/tour_service.dart';
|
||||||
|
import '../../util/login.dart';
|
||||||
import 'tour_select.dart';
|
import 'tour_select.dart';
|
||||||
|
|
||||||
class LoginPage extends StatefulWidget {
|
class LoginPage extends StatefulWidget {
|
||||||
@ -9,46 +22,67 @@ class LoginPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LoginPageState extends State<LoginPage> {
|
class _LoginPageState extends State<LoginPage> {
|
||||||
void _onLogin() {
|
|
||||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const TourSelectPage()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: BlocConsumer<AuthBloc, AuthState>(
|
||||||
child: Padding(
|
builder: (context, state) {
|
||||||
padding: EdgeInsets.only(
|
return Center(
|
||||||
top: MediaQuery.of(context).size.height * 0.1,
|
child: Padding(
|
||||||
),
|
padding: EdgeInsets.only(
|
||||||
child: Column(
|
top: MediaQuery.of(context).size.height * 0.1,
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
"assets/graphics/bg-supplier-clouds.png",
|
|
||||||
fit: BoxFit.contain,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Willkommen bei\nGaslieferung!",
|
|
||||||
style: Theme.of(context).textTheme.headlineMedium,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
"assets/graphics/bg-supplier-clouds.png",
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Willkommen bei\nGaslieferung!",
|
||||||
|
style: Theme.of(context).textTheme.headlineMedium,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
"\nMelden Sie sich an, um Ihre Tour zu starten.",
|
"\nMelden Sie sich an, um Ihre Tour zu starten.",
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(50),
|
padding: const EdgeInsets.all(50),
|
||||||
child: FilledButton(
|
child: FilledButton(
|
||||||
onPressed: _onLogin,
|
onPressed: () {
|
||||||
child: Text("Einloggen"),
|
context.read<AuthBloc>().add(AuthLoginEvent());
|
||||||
|
},
|
||||||
|
child: Text("Einloggen"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
listener: (context, state) {
|
||||||
|
if (state is AuthenticatedState) {
|
||||||
|
Navigator.pushReplacement(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => BlocProvider(
|
||||||
|
create: (context) => TourSelectBloc(
|
||||||
|
repository: TourRepository(
|
||||||
|
service: TourService(
|
||||||
|
baseUrl: "http://127.0.0.1:3000",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: TourSelectPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
);
|
||||||
),
|
}
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,425 @@
|
|||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_state.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/tour/tour_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/tour/tour_event.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import '../../bloc/tour/tour_state.dart';
|
||||||
|
import '../../model/tour.dart';
|
||||||
|
|
||||||
class TourPage extends StatefulWidget {
|
class TourPage extends StatefulWidget {
|
||||||
const TourPage({super.key});
|
final String carId;
|
||||||
|
|
||||||
|
const TourPage({super.key, required this.carId});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _TourPageState();
|
State<StatefulWidget> createState() => _TourPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TourPageState extends State<TourPage> {
|
class _TourPageState extends State<TourPage> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
var authState = context.read<AuthBloc>().state as AuthenticatedState;
|
||||||
|
context.read<TourBloc>().add(
|
||||||
|
TourLoadEvent(carId: "1234", sessionId: authState.sessionId),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _upperInfo(Tour tour) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
child: Image.asset(
|
||||||
|
"assets/graphics/bg-supplier-clouds.png",
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 15),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Heutige Lieferungen",
|
||||||
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10),
|
||||||
|
child: Text(
|
||||||
|
"Sie haben ${tour.deliveries.length.toString()} Lieferungen für heute",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _progressCard(Tour tour) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 10),
|
||||||
|
child: Card(
|
||||||
|
color: Theme.of(context).colorScheme.surfaceContainerLowest,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
child: Image.asset(
|
||||||
|
"assets/graphics/truck.png",
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10),
|
||||||
|
child: Text(
|
||||||
|
"Tour-Fortschritt",
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"${tour.progressPercentage.toStringAsFixed(0)}% erledigt",
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8, bottom: 16),
|
||||||
|
child: LinearProgressIndicator(
|
||||||
|
value: tour.progress,
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(padding: const EdgeInsets.only(bottom: 15)),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.check_circle,
|
||||||
|
color: Theme.of(context).colorScheme.tertiary,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10),
|
||||||
|
child: Text(
|
||||||
|
"Erledigte Lieferungen",
|
||||||
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
"${tour.amountFinishedDeliveries} von ${tour.amountDeliveries}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const VerticalDivider(
|
||||||
|
width: 20,
|
||||||
|
thickness: 1,
|
||||||
|
indent: 20,
|
||||||
|
endIndent: 1,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.event_note_outlined,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10),
|
||||||
|
child: Text(
|
||||||
|
"Offene Lieferungen",
|
||||||
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
"${tour.amountDeliveriesLeft} übrig",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _nextDeliveryCard(Tour tour) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||||
|
child: Card(
|
||||||
|
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Nächste Lieferung",
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
child: Image.asset(
|
||||||
|
"assets/graphics/location-pin-cloud.png",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 0),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.surfaceContainerLowest,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
tour.deliveries[0].receipt.customer.name,
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.titleSmall,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
tour
|
||||||
|
.deliveries[0]
|
||||||
|
.receipt
|
||||||
|
.customer
|
||||||
|
.displayAddress,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: Icon(Icons.map, size: 32),
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
bottom: 10,
|
||||||
|
),
|
||||||
|
child: const Divider(),
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.location_pin,
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 2),
|
||||||
|
child: Text("10km"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 15),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.access_time_filled,
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.primary,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 2),
|
||||||
|
child: Text("Ankunft in 10min"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _openDeliveries(Tour tour) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10, right: 10),
|
||||||
|
child: Card(
|
||||||
|
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Lieferungen",
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: ListView.separated(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
final delivery = tour.deliveries[index];
|
||||||
|
return ListTile(
|
||||||
|
leading: SizedBox(
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
child: Image.asset("assets/graphics/gas-tank.png"),
|
||||||
|
),
|
||||||
|
tileColor: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.surfaceContainerLowest,
|
||||||
|
title: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
delivery.receipt.customer.name,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Text(delivery.receipt.customer.displayAddress, style: TextStyle(fontSize: 13)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) =>
|
||||||
|
Padding(padding: const EdgeInsets.only(top: 10)),
|
||||||
|
itemCount: tour.amountDeliveries,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _listTour(Tour tour) {
|
||||||
|
return ListView(
|
||||||
|
children: [
|
||||||
|
_upperInfo(tour),
|
||||||
|
_progressCard(tour),
|
||||||
|
_nextDeliveryCard(tour),
|
||||||
|
_openDeliveries(tour),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text("Lieferungen")),
|
appBar: AppBar(title: Text("Lieferungen")),
|
||||||
body: Center(child: const Text("HI")),
|
body: BlocBuilder<TourBloc, TourState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is TourLoading) {
|
||||||
|
return Center(child: CircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state is TourLoaded) {
|
||||||
|
return _listTour(state.tour);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state is TourLoadingFailed) {
|
||||||
|
return Center(child: Text(state.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Container();
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
lib/ui/page/tour_detail.dart
Normal file
19
lib/ui/page/tour_detail.dart
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class TourDetailPage extends StatefulWidget {
|
||||||
|
/// The id of the car that has been chosen a step before.
|
||||||
|
final String supplierCarId;
|
||||||
|
|
||||||
|
const TourDetailPage({super.key, required this.supplierCarId});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => _TourDetailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TourDetailPageState extends State<TourDetailPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: implement build
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,13 @@
|
|||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/authentication/auth_state.dart';
|
||||||
|
import 'package:app_gaslieferung/bloc/tour_select/bloc.dart';
|
||||||
|
import 'package:app_gaslieferung/model/supplier.dart';
|
||||||
|
import 'package:app_gaslieferung/ui/page/tour.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import '../../bloc/tour_select/event.dart';
|
||||||
|
import '../../bloc/tour_select/state.dart';
|
||||||
|
|
||||||
class TourSelectPage extends StatefulWidget {
|
class TourSelectPage extends StatefulWidget {
|
||||||
const TourSelectPage({super.key});
|
const TourSelectPage({super.key});
|
||||||
@ -8,95 +17,156 @@ class TourSelectPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _TourSelectPageState extends State<TourSelectPage> {
|
class _TourSelectPageState extends State<TourSelectPage> {
|
||||||
Widget _listTour() {
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
context.read<TourSelectBloc>().add(
|
||||||
|
TourSelectLoadMetadataEvent(
|
||||||
|
sessionId:
|
||||||
|
(context.read<AuthBloc>().state as AuthenticatedState).sessionId,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _listTour(SupplierTourMetadata data) {
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
TourMetadata tourData = data.tours[index];
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(Icons.local_shipping_outlined),
|
leading: Icon(Icons.local_shipping_outlined),
|
||||||
title: const Text("Dennis Nemec"),
|
onTap: () => Navigator.push(
|
||||||
subtitle: const Text("15 Lieferungen"),
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => TourPage(carId: tourData.car.id.toString()),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
title: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [Text(tourData.car.driverName ?? tourData.car.carName)],
|
||||||
|
),
|
||||||
|
subtitle: Row(
|
||||||
|
children: [
|
||||||
|
tourData.car.driverName != null
|
||||||
|
? Text("${tourData.car.carName} | ")
|
||||||
|
: Container(),
|
||||||
|
|
||||||
|
Text("${tourData.amountDeliveries} Lieferungen"),
|
||||||
|
],
|
||||||
|
),
|
||||||
tileColor: Theme.of(context).colorScheme.surface,
|
tileColor: Theme.of(context).colorScheme.surface,
|
||||||
trailing: Icon(Icons.arrow_forward_ios),
|
trailing: Icon(Icons.arrow_forward_ios),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
separatorBuilder: (BuildContext context, int index) =>
|
separatorBuilder: (BuildContext context, int index) =>
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
itemCount: 6,
|
itemCount: data.tours.length,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: BlocBuilder<TourSelectBloc, TourSelectState>(
|
||||||
child: ListView(
|
builder: (context, state) {
|
||||||
children: [
|
if (state is TourSelectLoading) {
|
||||||
Image.asset(
|
return const Center(child: CircularProgressIndicator());
|
||||||
"assets/graphics/bg-carrier-cylinder-duo.png",
|
}
|
||||||
fit: BoxFit.contain,
|
|
||||||
),
|
|
||||||
|
|
||||||
Padding(padding: const EdgeInsets.only(top: 25), child: Text(
|
if (state is TourSelectError) {
|
||||||
"Wählen Sie Ihre Tour aus:",
|
return Center(child: Text(state.message));
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
}
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),),
|
|
||||||
|
|
||||||
Padding(
|
if (state is TourSelectLoaded) {
|
||||||
padding: const EdgeInsets.all(15),
|
return Center(
|
||||||
child: SizedBox(
|
child: ListView(
|
||||||
width: double.infinity,
|
children: [
|
||||||
child: Card(
|
Image.asset(
|
||||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
"assets/graphics/bg-carrier-cylinder-duo.png",
|
||||||
child: Padding(
|
fit: BoxFit.contain,
|
||||||
padding: const EdgeInsets.all(20),
|
),
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 10),
|
|
||||||
child: Icon(Icons.tour),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Touren",
|
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 10),
|
|
||||||
child: Icon(Icons.calendar_month),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"01.02.2026",
|
|
||||||
style: Theme.of(context).textTheme.labelLarge,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 15),
|
padding: const EdgeInsets.only(top: 25),
|
||||||
child: _listTour(),
|
child: Text(
|
||||||
),
|
"Wählen Sie Ihre Tour aus:",
|
||||||
],
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.surfaceContainerHighest,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 10,
|
||||||
|
),
|
||||||
|
child: Icon(Icons.tour),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Touren",
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 10,
|
||||||
|
),
|
||||||
|
child: Icon(Icons.calendar_month),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
state.data.date,
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.labelLarge,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 15),
|
||||||
|
child: _listTour(state.data),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
],
|
}
|
||||||
),
|
|
||||||
|
return Container();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,9 +29,14 @@ class AppTheme {
|
|||||||
onErrorContainer: Color(0xFF410E0B),
|
onErrorContainer: Color(0xFF410E0B),
|
||||||
|
|
||||||
surface: Color(0xFFFFF8F2),
|
surface: Color(0xFFFFF8F2),
|
||||||
|
surfaceContainerLowest: Color(0xFFFFFFFF),
|
||||||
|
surfaceContainerLow: Color(0xFFFFF4EB),
|
||||||
|
surfaceContainer: Color(0xFFFAEFE5),
|
||||||
|
surfaceContainerHigh: Color(0xFFF5E9DE),
|
||||||
|
surfaceContainerHighest: Color(0xFFEFE3D8),
|
||||||
onSurface: Color(0xFF1F1F1F),
|
onSurface: Color(0xFF1F1F1F),
|
||||||
|
|
||||||
surfaceContainerHighest: Color(0xFFF2E6DA),
|
//surfaceContainerHighest: Color(0xFFF2E6DA),
|
||||||
onSurfaceVariant: Color(0xFF4A4A4A),
|
onSurfaceVariant: Color(0xFF4A4A4A),
|
||||||
|
|
||||||
outline: Color(0xFFC8BEB4),
|
outline: Color(0xFFC8BEB4),
|
||||||
|
|||||||
70
lib/ui/widgets/message_wrapper/message_wrapper.dart
Normal file
70
lib/ui/widgets/message_wrapper/message_wrapper.dart
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import '../../../bloc/message_wrapper/message_bloc.dart';
|
||||||
|
import '../../../bloc/message_wrapper/message_state.dart';
|
||||||
|
|
||||||
|
class MessageWrapperWidget extends StatefulWidget {
|
||||||
|
final Widget child;
|
||||||
|
|
||||||
|
const MessageWrapperWidget({super.key, required this.child});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => MessageWrapperWidgetState();
|
||||||
|
|
||||||
|
static MessageWrapperWidgetState of(BuildContext context) {
|
||||||
|
return context.findAncestorStateOfType<MessageWrapperWidgetState>()!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MessageWrapperWidgetState extends State<MessageWrapperWidget> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<MessageBloc, MessageState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is MessageShowState) {
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
widget.child,
|
||||||
|
Positioned(
|
||||||
|
top: 50,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.primaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 15),
|
||||||
|
child: Icon(Icons.info, size: 32),
|
||||||
|
),
|
||||||
|
Expanded(child: Text(state.message)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return widget.child;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
lib/util/login.dart
Normal file
15
lib/util/login.dart
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import 'package:app_gaslieferung/exceptions/login.dart';
|
||||||
|
import 'package:app_links/app_links.dart';
|
||||||
|
|
||||||
|
String getSessionIdFromUrl(Uri uri) {
|
||||||
|
if (uri.scheme == 'myapp' && uri.host == 'callback') {
|
||||||
|
final code = uri.queryParameters['session_id'];
|
||||||
|
if (code != null) {
|
||||||
|
return code;
|
||||||
|
} else {
|
||||||
|
throw LoginNoSessionIdException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw LoginInvalidUrlException();
|
||||||
|
}
|
||||||
@ -35,6 +35,11 @@ dependencies:
|
|||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
bloc: ^9.2.0
|
bloc: ^9.2.0
|
||||||
|
app_links: ^7.0.0
|
||||||
|
url_launcher: ^6.3.2
|
||||||
|
flutter_bloc: ^9.1.1
|
||||||
|
http: ^1.6.0
|
||||||
|
json_serializable: ^6.12.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -46,6 +51,7 @@ dev_dependencies:
|
|||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^6.0.0
|
flutter_lints: ^6.0.0
|
||||||
|
build_runner: ^2.10.5
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
@ -62,10 +68,11 @@ flutter:
|
|||||||
assets:
|
assets:
|
||||||
- assets/graphics/bg-supplier-clouds.png
|
- assets/graphics/bg-supplier-clouds.png
|
||||||
- assets/graphics/gas-tank.png
|
- assets/graphics/gas-tank.png
|
||||||
|
- assets/graphics/gas-carrier.png
|
||||||
- assets/graphics/supplier.png
|
- assets/graphics/supplier.png
|
||||||
- assets/graphics/location-pin-cloud.png
|
- assets/graphics/location-pin-cloud.png
|
||||||
- assets/graphics/bg-carrier-cylinder-duo.png
|
- assets/graphics/bg-carrier-cylinder-duo.png
|
||||||
|
- assets/graphics/truck.png
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/to/resolution-aware-images
|
# https://flutter.dev/to/resolution-aware-images
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import 'package:app_gaslieferung/main.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||||
// Build our app and trigger a frame.
|
// Build our app and trigger a frame.
|
||||||
await tester.pumpWidget(const MyApp());
|
await tester.pumpWidget(const GasDeliveryApp());
|
||||||
|
|
||||||
// Verify that our counter starts at 0.
|
// Verify that our counter starts at 0.
|
||||||
expect(find.text('0'), findsOneWidget);
|
expect(find.text('0'), findsOneWidget);
|
||||||
|
|||||||
Reference in New Issue
Block a user