Added uniform loading indicator for all screens
This commit is contained in:
parent
de0d82f583
commit
072564fd31
15
android/.idea/gradle.xml
generated
15
android/.idea/gradle.xml
generated
@ -9,14 +9,17 @@
|
||||
<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/file_picker-5.2.11/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/flutter_plugin_android_lifecycle-2.0.14/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_android-0.8.6+11/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/device_info_plus-8.2.2/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file_picker-5.3.1/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.3.0/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.15/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_android-0.8.6+17/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_info-2.0.2/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+1/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.31/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.2.8+4/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-21.2.8/android" />
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.35/android" />
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
|
4
android/.idea/jarRepositories.xml
generated
4
android/.idea/jarRepositories.xml
generated
@ -17,8 +17,8 @@
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google9" />
|
||||
<option name="name" value="Google9" />
|
||||
<option name="id" value="Google8" />
|
||||
<option name="name" value="Google8" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
|
2
android/.idea/kotlinc.xml
generated
2
android/.idea/kotlinc.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.6.10" />
|
||||
<option name="version" value="1.7.22" />
|
||||
</component>
|
||||
</project>
|
17
android/.idea/workspace.xml
generated
17
android/.idea/workspace.xml
generated
@ -4,18 +4,19 @@
|
||||
<option name="autoReloadType" value="NONE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="55523c1b-a651-4ecd-b499-9518606f9735" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../.idea/libraries/Dart_Packages.xml" afterDir="false" />
|
||||
<list default="true" id="3a85c1e5-8060-4ece-92bb-103238b65897" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/jarRepositories.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/jarRepositories.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/kotlinc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/kotlinc.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/../pubspec.yaml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[/home/elias/.android/avd/Pixel_XL_API_30.avd]" />
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[/home/elias/.android/avd/Nexus_10_API_30.avd]" />
|
||||
<component name="ExternalProjectsData">
|
||||
<projectState path="$PROJECT_DIR$">
|
||||
<ProjectState />
|
||||
@ -29,7 +30,7 @@
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="ProjectId" id="2PQt9ih7RXI4ANibeGG9zQL3kSX" />
|
||||
<component name="ProjectId" id="2QyvXwW5ikwP9uWcseM58nPLgSu" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
@ -39,6 +40,8 @@
|
||||
"keyToString": {
|
||||
"BundleExportedModule": "android.app",
|
||||
"ExportBundle.BundlePathForandroid.app": "/home/elias/projects/MarianumMobile/Client/android/app",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"cidr.known.project.marker": "true",
|
||||
"dart.analysis.tool.window.visible": "false",
|
||||
@ -114,11 +117,11 @@
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="55523c1b-a651-4ecd-b499-9518606f9735" name="Changes" comment="" />
|
||||
<created>1683400983746</created>
|
||||
<changelist id="3a85c1e5-8060-4ece-92bb-103238b65897" name="Changes" comment="" />
|
||||
<created>1686338678988</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1683400983746</updated>
|
||||
<updated>1686338678988</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
@ -5,6 +5,7 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:loader_overlay/loader_overlay.dart';
|
||||
import 'package:marianum_mobile/storage/base/settingsProvider.dart';
|
||||
import 'package:marianum_mobile/widget/loadingSpinner.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../api/marianumcloud/webdav/queries/listFiles/cacheableFile.dart';
|
||||
@ -223,7 +224,7 @@ class _FilesState extends State<Files> {
|
||||
},
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
body: data == null ? const Center(child: CircularProgressIndicator()) : data!.files.isEmpty ? const ErrorView(icon: Icons.folder_off_rounded, text: "Der Ordner ist leer") : LoaderOverlay(
|
||||
body: data == null ? const LoadingSpinner() : data!.files.isEmpty ? const ErrorView(icon: Icons.folder_off_rounded, text: "Der Ordner ist leer") : LoaderOverlay(
|
||||
child: RefreshIndicator(
|
||||
onRefresh: () {
|
||||
_query();
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:marianum_mobile/widget/loadingSpinner.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../../api/mhsl/message/getMessages/getMessagesResponse.dart';
|
||||
@ -30,7 +31,7 @@ class _MessageState extends State<Message> {
|
||||
title: const Text("Marianum Message"),
|
||||
),
|
||||
body: Consumer<MessageProps>(builder: (context, value, child) {
|
||||
if(value.primaryLoading()) return const Center(child: CircularProgressIndicator());
|
||||
if(value.primaryLoading()) return const LoadingSpinner();
|
||||
|
||||
return RefreshIndicator(
|
||||
child: ListView.builder(
|
||||
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:marianum_mobile/api/marianumcloud/talk/createRoom/createRoomParams.dart';
|
||||
import 'package:marianum_mobile/widget/confirmDialog.dart';
|
||||
import 'package:marianum_mobile/widget/loadingSpinner.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../api/marianumcloud/talk/createRoom/createRoom.dart';
|
||||
@ -78,9 +79,7 @@ class _ChatListState extends State<ChatList> {
|
||||
body: Consumer<ChatListProps>(
|
||||
builder: (context, data, child) {
|
||||
|
||||
if(data.primaryLoading()) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
if(data.primaryLoading()) return const LoadingSpinner();
|
||||
|
||||
latestData = data;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:loader_overlay/loader_overlay.dart';
|
||||
import 'package:marianum_mobile/widget/loadingSpinner.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../api/marianumcloud/talk/chat/getChatResponse.dart';
|
||||
@ -96,7 +97,7 @@ class _ChatViewState extends State<ChatView> {
|
||||
)
|
||||
),
|
||||
child: LoaderOverlay(
|
||||
child: data.primaryLoading() ? const Center(child: CircularProgressIndicator()) : Column(
|
||||
child: data.primaryLoading() ? const LoadingSpinner() : Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
|
@ -2,6 +2,7 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:marianum_mobile/widget/loadingSpinner.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
|
||||
@ -62,7 +63,7 @@ class _TimetableState extends State<Timetable> {
|
||||
),
|
||||
body: Consumer<TimetableProps>(
|
||||
builder: (context, value, child) {
|
||||
if(value.primaryLoading()) return const Placeholder();
|
||||
if(value.primaryLoading()) return const LoadingSpinner();
|
||||
|
||||
GetHolidaysResponse holidays = value.getHolidaysResponse;
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LoadingSpinner extends StatefulWidget {
|
||||
@ -9,21 +11,39 @@ class LoadingSpinner extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _LoadingSpinnerState extends State<LoadingSpinner> {
|
||||
bool textVisible = false;
|
||||
late Timer timer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
timer = Timer(const Duration(seconds: 10), () {
|
||||
setState(() {
|
||||
textVisible = true;
|
||||
});
|
||||
});
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CircularProgressIndicator(
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
const Padding(padding: EdgeInsets.only(left: 15), child: Text("Daten abrufen...")),
|
||||
],
|
||||
),
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
Visibility(
|
||||
visible: textVisible,
|
||||
child: const Text("Bist du mit dem Internet verbunden?"),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
timer.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,13 @@
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_linux
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
|
@ -6,6 +6,7 @@ import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import device_info_plus
|
||||
import file_selector_macos
|
||||
import package_info
|
||||
import path_provider_foundation
|
||||
import shared_preferences_foundation
|
||||
@ -15,6 +16,7 @@ import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
|
@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+3
|
||||
version: 0.0.1+4
|
||||
|
||||
environment:
|
||||
sdk: '>=2.18.4 <3.0.0'
|
||||
|
@ -6,10 +6,13 @@
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <syncfusion_pdfviewer_windows/syncfusion_pdfviewer_windows_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
FileSelectorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||
SyncfusionPdfviewerWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SyncfusionPdfviewerWindowsPlugin"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
|
@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_windows
|
||||
syncfusion_pdfviewer_windows
|
||||
url_launcher_windows
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user