This commit is contained in:
Elias Müller 2023-02-20 13:32:14 +01:00
parent fea36b9a6d
commit edd8c1600a
27 changed files with 17 additions and 87 deletions

View File

@ -250,7 +250,7 @@
<entry key="flutter_native_splash">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.17/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.18/lib" />
</list>
</value>
</entry>
@ -872,7 +872,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_lints-2.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_login-4.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.17/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.18/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/font_awesome_flutter-10.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/frontend_server_client-3.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.1/lib" />

View File

@ -1,7 +1,6 @@
<component name="libraryTable">
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
<CLASSES>
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.17" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider-2.0.12" />
@ -20,6 +19,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_web-2.0.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.3" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.0.15" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_native_splash-2.2.18" />
</CLASSES>
<JAVADOC />
<SOURCES />

View File

@ -1,7 +1,4 @@
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:marianum_mobile/api/apiError.dart';
class ApiRequest {

View File

@ -1,4 +1,3 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';

View File

@ -1,9 +1,5 @@
import 'dart:convert';
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:marianum_mobile/api/apiRequest.dart';
import 'package:marianum_mobile/api/apiResponse.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../apiParams.dart';
@ -42,7 +38,7 @@ abstract class TalkApi<T> extends ApiRequest {
headers?.putIfAbsent("OCS-APIRequest", () => "true");
http.Response data = await request(endpoint, body, headers);
dynamic jsonData = jsonDecode(data.body);
//dynamic jsonData = jsonDecode(data.body);
return assemble(data.body);

View File

@ -1,8 +1,5 @@
import 'dart:convert';
import 'dart:developer';
import 'package:intl/intl.dart';
import 'package:marianum_mobile/api/apiResponse.dart';
import 'package:marianum_mobile/api/webuntis/webuntisApi.dart';
import 'getHolidaysResponse.dart';

View File

@ -1,6 +1,5 @@
import 'dart:convert';
import 'package:marianum_mobile/api/apiResponse.dart';
import 'package:marianum_mobile/api/webuntis/webuntisApi.dart';
import 'getRoomsResponse.dart';

View File

@ -2,7 +2,6 @@ import 'dart:convert';
import 'package:marianum_mobile/api/webuntis/webuntisApi.dart';
import '../../../apiResponse.dart';
import 'getSubjectsResponse.dart';
class GetSubjects extends WebuntisApi {

View File

@ -1,7 +1,5 @@
import 'dart:convert';
import 'dart:developer';
import 'package:marianum_mobile/api/apiResponse.dart';
import 'package:marianum_mobile/api/webuntis/webuntisApi.dart';
import 'getTimetableParams.dart';

View File

@ -1,7 +1,5 @@
import 'dart:convert';
import 'dart:developer';
import 'package:localstore/localstore.dart';
import 'package:marianum_mobile/api/requestCache.dart';
import '../authenticate/authenticate.dart';

View File

@ -1,15 +1,12 @@
import 'package:flutter/material.dart';
import 'package:marianum_mobile/screen/pages/timetable/timetable.dart';
import 'package:marianum_mobile/screen/pages/timetable/testTimetable.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'dataOld/incommingPackets/talkNotificationsPacket.dart';
import 'screen/pages/files/files.dart';
import 'screen/pages/more/overhang.dart';
import 'screen/pages/talk/chatList.dart';
import 'screen/pages/timetable/timetableOld.dart';
import 'screen/settings/settings.dart';
class App extends StatefulWidget {
@ -52,7 +49,7 @@ class _AppState extends State<App> {
Flexible(
child: PageView(
controller: pageController,
children: [
children: const [
Timetable(),
ChatList(),
Files(),

View File

@ -1,11 +1,6 @@
import 'dart:collection';
import 'dart:convert';
import 'dart:developer';
import 'package:intl/intl.dart';
import 'package:marianum_mobile/api/apiResponse.dart';
import 'package:marianum_mobile/api/webuntis/queries/authenticate/authenticate.dart';
import 'package:marianum_mobile/api/webuntis/queries/authenticate/authenticateResponse.dart';
import 'package:marianum_mobile/api/webuntis/queries/getHolidays/getHolidaysCache.dart';
import 'package:marianum_mobile/api/webuntis/queries/getHolidays/getHolidaysResponse.dart';
import 'package:marianum_mobile/api/webuntis/queries/getRooms/getRoomsCache.dart';
@ -14,9 +9,7 @@ import 'package:marianum_mobile/api/webuntis/queries/getSubjects/getSubjectsCach
import 'package:marianum_mobile/api/webuntis/queries/getSubjects/getSubjectsResponse.dart';
import 'package:marianum_mobile/data/dataHolder.dart';
import '../../api/webuntis/queries/getTimetable/getTimetable.dart';
import '../../api/webuntis/queries/getTimetable/getTimetableCache.dart';
import '../../api/webuntis/queries/getTimetable/getTimetableParams.dart';
import '../../api/webuntis/queries/getTimetable/getTimetableResponse.dart';
class TimetableProps extends DataHolder {

View File

@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
class AccountModel extends ChangeNotifier {
bool _isLoggedIn = false;

View File

@ -1,4 +1,3 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';

View File

@ -1,5 +1,4 @@
import 'dart:developer';
import 'package:shared_preferences/shared_preferences.dart';

View File

@ -1,6 +1,4 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import '../incomingPacket.dart';

View File

@ -1,6 +1,4 @@
import 'dart:convert';
import 'package:intl/intl.dart';
import 'package:jiffy/jiffy.dart';
import '../incomingPacket.dart';

View File

@ -1,6 +1,4 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import '../incomingPacket.dart';
@ -39,8 +37,8 @@ class TimeTableData {
}
class TimeTableDay {
List<TimeTableEntry> _entries;
String _name;
final List<TimeTableEntry> _entries;
final String _name;
TimeTableDay(this._entries, this._name);

View File

@ -7,7 +7,6 @@ import 'package:marianum_mobile/screen/login/login.dart';
import 'package:marianum_mobile/widget/loadingSpinner.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'app.dart';
import 'data/chatList/chatListProps.dart';
@ -15,12 +14,7 @@ import 'data/chatList/chatProps.dart';
import 'dataOld/accountModel.dart';
import 'dataOld/incommingPackets/authenticatePacket.dart';
import 'dataOld/incommingPackets/errorPacket.dart';
import 'dataOld/incommingPackets/fileListPacket.dart';
import 'dataOld/incommingPackets/serverInfoPacket.dart';
import 'dataOld/incommingPackets/talkChatPacket.dart';
import 'dataOld/incommingPackets/talkContactsPacket.dart';
import 'dataOld/incommingPackets/talkNotificationsPacket.dart';
import 'dataOld/incommingPackets/timetablePacket.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();

View File

@ -1,12 +1,8 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:jiffy/jiffy.dart';
import 'package:marianum_mobile/api/marianumcloud/talk/room/getRoomResponse.dart';
import 'package:marianum_mobile/data/chatList/chatListProps.dart';
import 'package:marianum_mobile/widget/loadingPacket.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -49,7 +45,7 @@ class _ChatListState extends State<ChatList> {
for (var chatRoom in data.getRoomsResponse.sortByLastActivity()) {
CircleAvatar _circleAvatar = CircleAvatar(
CircleAvatar circleAvatar = CircleAvatar(
foregroundImage: chatRoom.type == GetRoomResponseObjectConversationType.oneToOne ? Image.network("https://cloud.marianum-fulda.de/avatar/${chatRoom.name}/128").image : null,
backgroundColor: Theme.of(context).primaryColor,
foregroundColor: Colors.white,
@ -81,13 +77,13 @@ class _ChatListState extends State<ChatList> {
),
),
),
leading: _circleAvatar,
leading: circleAvatar,
onTap: () async {
Navigator.of(context).push(MaterialPageRoute(builder: (context) {
return ChatView(
user: chatRoom,
selfId: username,
avatar: _circleAvatar,
avatar: circleAvatar,
);
}));
},

View File

@ -1,4 +1,3 @@
import 'dart:developer';
import 'package:bubble/bubble.dart';
import 'package:flutter/material.dart';
@ -63,7 +62,6 @@ class _ChatViewState extends State<ChatView> {
List<Bubble> messages = List<Bubble>.empty(growable: true);
if(!data.primaryLoading()) {
String lastActor = "";
bool showMetadata = true;
data.getChatResponse.sortByTimestamp().forEach((element) {
@ -93,7 +91,7 @@ class _ChatViewState extends State<ChatView> {
child: Positioned(
top: 0,
left: 0,
child: Text("${element.actorDisplayName}", style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).primaryColor)),
child: Text(element.actorDisplayName, style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).primaryColor)),
),
),
Padding(
@ -114,8 +112,6 @@ class _ChatViewState extends State<ChatView> {
],
),
));
lastActor = element.actorId;
});
}

View File

@ -1,18 +1,9 @@
import 'dart:developer';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:jiffy/jiffy.dart';
import 'package:marianum_mobile/api/webuntis/queries/getRooms/getRoomsResponse.dart';
import 'package:marianum_mobile/api/webuntis/queries/getSubjects/getSubjectsResponse.dart';
import 'package:marianum_mobile/data/timetable/timetableProps.dart';
import 'package:marianum_mobile/screen/pages/timetable/dayListView.dart';
import 'package:marianum_mobile/screen/pages/timetable/testTimetable.dart';
import 'package:marianum_mobile/widget/loadingSpinner.dart';
import 'package:provider/provider.dart';
import 'package:timetable_view/timetable_view.dart';
import '../../../api/webuntis/queries/getTimetable/getTimetableResponse.dart';
class Timetable extends StatefulWidget {
const Timetable({Key? key}) : super(key: key);

View File

@ -1,7 +1,5 @@
import 'dart:developer';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:marianum_mobile/widget/loadingPacket.dart';
import 'package:provider/provider.dart';
@ -41,10 +39,10 @@ class _TimetableOldState extends State<TimetableOld> {
List<LaneEvents> _buildLaneEvents(context, TimetablePacket data) {
List<LaneEvents> laneEvents = List<LaneEvents>.empty(growable: true);
data.timeTable.days.forEach((day) {
for (var day in data.timeTable.days) {
List<TableEvent> tableEvents = List<TableEvent>.empty(growable: true);
day.entries.forEach((element) {
for (var element in day.entries) {
tableEvents.add(
TableEvent(
backgroundColor: Theme.of(context).primaryColor,
@ -57,7 +55,7 @@ class _TimetableOldState extends State<TimetableOld> {
endTime: TableEventTime(hour: element.end.hour, minute: element.end.minute)
)
);
});
}
laneEvents.add(
LaneEvents(
@ -65,7 +63,7 @@ class _TimetableOldState extends State<TimetableOld> {
events: tableEvents
)
);
});
}
return laneEvents;
@ -97,9 +95,9 @@ class CustomTableStyle extends TimetableStyle {
@override
double get laneWidth => 200;
@override
Color get cornerColor => Theme.of(this.context).primaryColor;
Color get cornerColor => Theme.of(context).primaryColor;
@override
Color get timeItemTextColor => Theme.of(this.context).primaryColor;
Color get timeItemTextColor => Theme.of(context).primaryColor;
@override
// TODO: implement timeItemHeight
double get timeItemHeight => 60;

View File

@ -1,7 +1,4 @@
import 'dart:convert';
import 'dart:developer';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:jiffy/jiffy.dart';
import 'package:localstore/localstore.dart';

View File

@ -4,8 +4,6 @@ import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../dataOld/accountModel.dart';
import '../../dataOld/incommingPackets/serverInfoPacket.dart';
import '../../widget/ListItem.dart';
import 'debug/debugOverview.dart';
class Settings extends StatefulWidget {

View File

@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../dataOld/incomingPacket.dart';

View File

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class OfflineBanner extends StatelessWidget {