Minor fixes for file download handling

This commit is contained in:
Elias Müller 2023-05-04 21:35:25 +02:00
parent 9b6a307212
commit eab9e30943
14 changed files with 246 additions and 115 deletions

View File

@ -5,14 +5,14 @@
<entry key="_fe_analyzer_shared"> <entry key="_fe_analyzer_shared">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-55.0.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-59.0.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="analyzer"> <entry key="analyzer">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-5.7.1/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-5.11.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -33,7 +33,7 @@
<entry key="archive"> <entry key="archive">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.6/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.7/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -61,7 +61,7 @@
<entry key="badges"> <entry key="badges">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.0.2/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.1.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -250,7 +250,7 @@
<entry key="dart_style"> <entry key="dart_style">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-2.2.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-2.3.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -432,7 +432,7 @@
<entry key="image"> <entry key="image">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image-4.0.15/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image-4.0.16/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -544,7 +544,7 @@
<entry key="nextcloud"> <entry key="nextcloud">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/git/nextcloud-neon-bf2a0f5740b12780cb4cf628a2f3bb3976e913f5/packages/nextcloud/lib" /> <option value="$USER_HOME$/.pub-cache/git/nextcloud-neon-32c6fb857586fda20ced274ed131be90c9adc67d/packages/nextcloud/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -572,21 +572,21 @@
<entry key="path_provider"> <entry key="path_provider">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.13/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.14/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="path_provider_android"> <entry key="path_provider_android">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.24/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="path_provider_foundation"> <entry key="path_provider_foundation">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.3/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -607,7 +607,7 @@
<entry key="path_provider_windows"> <entry key="path_provider_windows">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -649,7 +649,7 @@
<entry key="pointycastle"> <entry key="pointycastle">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pointycastle-3.6.2/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pointycastle-3.7.3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -712,49 +712,49 @@
<entry key="shared_preferences"> <entry key="shared_preferences">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.0.18/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.1.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_android"> <entry key="shared_preferences_android">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.0.17/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_foundation"> <entry key="shared_preferences_foundation">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.1.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_linux"> <entry key="shared_preferences_linux">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.1.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_platform_interface"> <entry key="shared_preferences_platform_interface">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.1.1/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.2.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_web"> <entry key="shared_preferences_web">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.0.6/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shared_preferences_windows"> <entry key="shared_preferences_windows">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.1.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -775,7 +775,7 @@
<entry key="sign_in_button"> <entry key="sign_in_button">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sign_in_button-3.1.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sign_in_button-3.2.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -810,14 +810,14 @@
<entry key="sqflite"> <entry key="sqflite">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.8/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="sqflite_common"> <entry key="sqflite_common">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.4.2+2/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.4.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -852,7 +852,7 @@
<entry key="synchronized"> <entry key="synchronized">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.0.1/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.1.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -908,28 +908,28 @@
<entry key="url_launcher_android"> <entry key="url_launcher_android">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.25/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="url_launcher_ios"> <entry key="url_launcher_ios">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.2/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="url_launcher_linux"> <entry key="url_launcher_linux">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.4/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="url_launcher_macos"> <entry key="url_launcher_macos">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.4/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -950,7 +950,7 @@
<entry key="url_launcher_windows"> <entry key="url_launcher_windows">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.5/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -985,14 +985,14 @@
<entry key="web_socket_channel"> <entry key="web_socket_channel">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.3.0/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="win32"> <entry key="win32">
<value> <value>
<list> <list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/win32-3.1.3/lib" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/win32-4.1.3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
@ -1010,6 +1010,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="xml_annotation">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/xml_annotation-2.2.0/lib" />
</list>
</value>
</entry>
<entry key="yaml"> <entry key="yaml">
<value> <value>
<list> <list>
@ -1021,16 +1028,16 @@
</properties> </properties>
<CLASSES> <CLASSES>
<root url="file://$USER_HOME$/.pub-cache/git/flowder-1ddd171a763c4f1ba09b95e34e35e2e5cf0d1bba//lib" /> <root url="file://$USER_HOME$/.pub-cache/git/flowder-1ddd171a763c4f1ba09b95e34e35e2e5cf0d1bba//lib" />
<root url="file://$USER_HOME$/.pub-cache/git/nextcloud-neon-bf2a0f5740b12780cb4cf628a2f3bb3976e913f5/packages/nextcloud/lib" /> <root url="file://$USER_HOME$/.pub-cache/git/nextcloud-neon-32c6fb857586fda20ced274ed131be90c9adc67d/packages/nextcloud/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-55.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-59.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-5.7.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-5.11.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/another_flushbar-1.12.29/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/another_flushbar-1.12.29/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/another_transformer_page_view-2.0.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/another_transformer_page_view-2.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.6/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/archive-3.3.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/asn1lib-1.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/asn1lib-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.10.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.10.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/badges-3.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/bubble-1.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/bubble-1.2.1/lib" />
@ -1057,7 +1064,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypton-2.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypton-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/csslib-0.17.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/csslib-0.17.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-2.2.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dart_style-2.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dio-4.0.6/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dio-4.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.0.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.0.1/lib" />
@ -1079,7 +1086,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http-0.13.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http-0.13.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/image-4.0.15/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/image-4.0.16/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/intl-0.17.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/intl-0.17.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/jiffy-5.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/jiffy-5.0.0/lib" />
@ -1098,18 +1105,18 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-1.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.13/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.14/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.24/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.10/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.10/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pedantic-1.11.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pedantic-1.11.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar-5.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar-5.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/petitparser-5.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/petitparser-5.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/platform-3.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/platform-3.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pointycastle-3.6.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pointycastle-3.7.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pretty_json-2.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pretty_json-2.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/process-4.2.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/process-4.2.4/lib" />
@ -1118,26 +1125,26 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pubspec_parse-1.2.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pubspec_parse-1.2.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/quiver-3.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/quiver-3.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/rxdart-0.27.7/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/rxdart-0.27.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.0.18/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.0.17/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.1.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.1.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.0.6/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.1.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sign_in_button-3.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sign_in_button-3.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_gen-1.2.7/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_gen-1.2.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_helper-1.3.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_helper-1.3.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.9.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.9.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.4.2+2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.4.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_transform-2.1.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_transform-2.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.0.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.4.16/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.4.16/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timetable_view-0.3.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timetable_view-0.3.0/lib" />
@ -1145,21 +1152,22 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/universal_io-2.2.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/universal_io-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.1.10/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.1.10/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.25/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.1.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.0.16/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.0.16/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.5/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/version-3.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/version-3.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.0.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.3.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/win32-3.1.3/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/win32-4.1.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xdg_directories-1.0.0/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xdg_directories-1.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xml-6.2.2/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xml-6.2.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xml_annotation-2.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.1/lib" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.1/lib" />
<root url="file:///opt/flutter/bin/cache/pkg/sky_engine/lib" /> <root url="file:///opt/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file:///opt/flutter/packages/flutter/lib" /> <root url="file:///opt/flutter/packages/flutter/lib" />

View File

@ -2,26 +2,26 @@
<library name="Flutter Plugins" type="FlutterPluginsLibraryType"> <library name="Flutter Plugins" type="FlutterPluginsLibraryType">
<CLASSES> <CLASSES>
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.19" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.19" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.0.18" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.1.10" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher-6.1.10" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.5" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.13" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.0.16" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_web-2.0.16" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.25" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.24" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.5" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.1.3" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.10" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.10" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.1.5" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.1.5" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.5" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.0.17" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.1" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.5" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.5" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.1.5" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.0.6" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.6" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences-2.1.0" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.6" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.8" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.14" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

1
.idea/misc.xml generated
View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager"> <component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />

3
android/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
android/.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

24
android/.idea/gradle.xml generated Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/better_open_file-3.6.4/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.19/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.8/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31/android" />
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

35
android/.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google7" />
<option name="name" value="Google7" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://storage.googleapis.com/download.flutter.io" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
</component>
</project>

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

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

10
android/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

6
android/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -3,6 +3,7 @@ import 'package:marianum_mobile/api/marianumcloud/webdav/queries/listFiles/cache
import 'package:marianum_mobile/api/marianumcloud/webdav/queries/listFiles/listFilesParams.dart'; import 'package:marianum_mobile/api/marianumcloud/webdav/queries/listFiles/listFilesParams.dart';
import 'package:marianum_mobile/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.dart'; import 'package:marianum_mobile/api/marianumcloud/webdav/queries/listFiles/listFilesResponse.dart';
import 'package:marianum_mobile/api/marianumcloud/webdav/webdavApi.dart'; import 'package:marianum_mobile/api/marianumcloud/webdav/webdavApi.dart';
import 'package:nextcloud/nextcloud.dart';
class ListFiles extends WebdavApi<ListFilesParams> { class ListFiles extends WebdavApi<ListFilesParams> {
ListFilesParams params; ListFilesParams params;
@ -11,7 +12,8 @@ class ListFiles extends WebdavApi<ListFilesParams> {
@override @override
Future<ListFilesResponse> run() async { Future<ListFilesResponse> run() async {
Set<CacheableFile> files = (await (await WebdavApi.webdav).ls(params.path)).map((e) => CacheableFile.fromDavFile(e)).toSet(); //Set<CacheableFile> files = (await (await WebdavApi.webdav).ls(params.path)).map((e) => CacheableFile.fromDavFile(e)).toSet();
Set<CacheableFile> files = (await (await WebdavApi.webdav).ls(params.path)).toWebDavFiles((await WebdavApi.webdav)).map((e) => CacheableFile.fromDavFile(e)).toSet();
return ListFilesResponse(files); return ListFilesResponse(files);
} }

View File

@ -20,16 +20,7 @@ class FileElement extends StatefulWidget {
List<String> path; List<String> path;
FileElement(this.file, this.path, {Key? key}) : super(key: key); FileElement(this.file, this.path, {Key? key}) : super(key: key);
@override static void download(String remotePath, String name, Function(double) onProgress, Function(OpenResult) onDone) async {
State<FileElement> createState() => _FileElementState();
}
class _FileElementState extends State<FileElement> {
late DownloaderCore core;
double percent = 0;
void download(String remotePath, String name) async {
Directory paths = await getApplicationDocumentsDirectory(); Directory paths = await getApplicationDocumentsDirectory();
String local = paths.path + Platform.pathSeparator + name; String local = paths.path + Platform.pathSeparator + name;
@ -37,9 +28,7 @@ class _FileElementState extends State<FileElement> {
DownloaderUtils options = DownloaderUtils( DownloaderUtils options = DownloaderUtils(
progressCallback: (current, total) { progressCallback: (current, total) {
final progress = (current / total) * 100; final progress = (current / total) * 100;
setState(() => { onProgress(progress);
percent = progress,
});
}, },
file: File(local), file: File(local),
progress: ProgressImplementation(), progress: ProgressImplementation(),
@ -48,29 +37,26 @@ class _FileElementState extends State<FileElement> {
Future<OpenResult> result = OpenFile.open(local); Future<OpenResult> result = OpenFile.open(local);
result.then((value) => { result.then((value) => {
if(value.type != ResultType.done) { onDone(value)
showDialog(context: context, builder: (context) {
return AlertDialog(
title: Text("Download"),
content: Text(value.message),
);
})
}
}); });
widget.file.currentlyDownloading = false;
percent = 0;
}, },
); );
log(local); log(local);
core = await Flowder.download( await Flowder.download(
"${await WebdavApi.webdavConnectString}$remotePath", "${await WebdavApi.webdavConnectString}$remotePath",
options, options,
); );
} }
@override
State<FileElement> createState() => _FileElementState();
}
class _FileElementState extends State<FileElement> {
double percent = 0;
Widget getSubtitle() { Widget getSubtitle() {
if(widget.file.currentlyDownloading) { if(widget.file.currentlyDownloading) {
return Row( return Row(
@ -114,7 +100,25 @@ class _FileElementState extends State<FileElement> {
log("Download: ${widget.file.path} to ${widget.file.name}"); log("Download: ${widget.file.path} to ${widget.file.name}");
download(widget.file.path, widget.file.name); FileElement.download(widget.file.path, widget.file.name, (progress) {
setState(() => {
percent = progress,
});
}, (result) {
if(result.type != ResultType.done) {
showDialog(context: context, builder: (context) {
return AlertDialog(
title: Text("Download"),
content: Text(result.message),
);
});
setState(() {
widget.file.currentlyDownloading = false;
percent = 0;
});
}
});
} }
}, },

View File

@ -1,8 +1,10 @@
import 'package:better_open_file/better_open_file.dart';
import 'package:bubble/bubble.dart'; import 'package:bubble/bubble.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:marianum_mobile/api/marianumcloud/talk/chat/getChatResponse.dart'; import 'package:marianum_mobile/api/marianumcloud/talk/chat/getChatResponse.dart';
import 'package:marianum_mobile/screen/pages/files/fileElement.dart';
import 'package:marianum_mobile/screen/pages/talk/chatMessage.dart'; import 'package:marianum_mobile/screen/pages/talk/chatMessage.dart';
import '../../../api/marianumcloud/talk/room/getRoomResponse.dart'; import '../../../api/marianumcloud/talk/room/getRoomResponse.dart';
@ -43,6 +45,7 @@ class ChatBubble {
bool isSender; bool isSender;
GetChatResponseObject bubbleData; GetChatResponseObject bubbleData;
GetRoomResponseObject chatData; GetRoomResponseObject chatData;
double downloadProgress = 0;
late ChatMessage message; late ChatMessage message;
ChatBubble({ ChatBubble({
@ -109,11 +112,19 @@ class ChatBubble {
child: Positioned( child: Positioned(
bottom: 0, bottom: 0,
right: 0, right: 0,
child: Text( child: Row(
children: [
Visibility(
visible: downloadProgress > 0,
child: LinearProgressIndicator(value: downloadProgress),
),
Text(
Jiffy.unixFromSecondsSinceEpoch(bubbleData.timestamp).format("HH:mm"), Jiffy.unixFromSecondsSinceEpoch(bubbleData.timestamp).format("HH:mm"),
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: const TextStyle(color: Colors.grey, fontSize: 12), style: const TextStyle(color: Colors.grey, fontSize: 12),
), ),
],
)
), ),
), ),
], ],
@ -135,11 +146,14 @@ class ChatBubble {
}, },
), ),
), ),
ListTile( Visibility(
visible: !isSender && chatData.type != GetRoomResponseObjectConversationType.oneToOne,
child: ListTile(
leading: const Icon(Icons.person), leading: const Icon(Icons.person),
title: Text("Zu '${bubbleData.actorDisplayName}' wechseln"), title: Text("Private Nachricht an '${bubbleData.actorDisplayName}'"),
onTap: () => {}, onTap: () => {},
), ),
),
ListTile( ListTile(
leading: const Icon(Icons.bug_report_outlined), leading: const Icon(Icons.bug_report_outlined),
title: const Text("Debugdaten anzeigen"), title: const Text("Debugdaten anzeigen"),
@ -149,10 +163,24 @@ class ChatBubble {
); );
}); });
}, },
onTap: () {
FileElement.download(message.file!.path!, message.file?.name ?? "Datei", (progress) => {
downloadProgress = progress,
}, (result) => {
downloadProgress = 0,
if(result.type != ResultType.done) {
showDialog(context: context, builder: (context) {
return AlertDialog(
content: Text(result.message),
);
})
}
});
},
); );
} }
Size _textSize(String text, TextStyle style) { Size _textSize(String text, TextStyle style) {
final TextPainter textPainter = TextPainter( final TextPainter textPainter = TextPainter(
text: TextSpan(text: text, style: style), text: TextSpan(text: text, style: style),

View File

@ -53,7 +53,7 @@ class ChatMessage {
fadeInDuration: const Duration(seconds: 1), fadeInDuration: const Duration(seconds: 1),
imageUrl: "https://cloud.marianum-fulda.de/core/preview?fileId=${file!.id}&x=100&y=-1&a=1", imageUrl: "https://cloud.marianum-fulda.de/core/preview?fileId=${file!.id}&x=100&y=-1&a=1",
httpHeaders: { httpHeaders: {
"Authorization": "Basic ${base64.encode(utf8.encode("${preferences.getString("username")}:${preferences.getString("password")}"))}" "Authorization": "Basic ${base64.encode(utf8.encode("${preferences.getString("username")}:${preferences.getString("password")}"))}" // TODO move authentication
}, },
); );
} }