diff --git a/lib/searchComponent/views/resultViews/cafeteria_search_result_view.dart b/lib/searchComponent/views/resultViews/cafeteria_search_result_view.dart index 2758b599..2fc9b8aa 100644 --- a/lib/searchComponent/views/resultViews/cafeteria_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/cafeteria_search_result_view.dart @@ -9,15 +9,15 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; class CafeteriasSearchResultView extends ConsumerWidget { - const CafeteriasSearchResultView({super.key, required this.viewModel}); + const CafeteriasSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.cafeterias, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: cafeteriaSearchViewModel, body: (cafeteria) => ListTile( title: Text(cafeteria.name), diff --git a/lib/searchComponent/views/resultViews/calendar_search_result_view.dart b/lib/searchComponent/views/resultViews/calendar_search_result_view.dart index 5bd55577..8d0baa46 100644 --- a/lib/searchComponent/views/resultViews/calendar_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/calendar_search_result_view.dart @@ -12,15 +12,15 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; class CalendarSearchResultView extends ConsumerWidget { - const CalendarSearchResultView({super.key, required this.viewModel}); + const CalendarSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.calendar, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: calendarSearchViewModel, body: (calendarEvent) => ListTile( title: Text(calendarEvent.title ?? "-"), diff --git a/lib/searchComponent/views/resultViews/grade_search_result_view.dart b/lib/searchComponent/views/resultViews/grade_search_result_view.dart index a6f26345..44eeaa11 100644 --- a/lib/searchComponent/views/resultViews/grade_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/grade_search_result_view.dart @@ -8,15 +8,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; class GradeSearchResultView extends ConsumerWidget { - const GradeSearchResultView({super.key, required this.viewModel}); + const GradeSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.grade, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: gradesSearchViewModel, body: (grade) => GradeRow(grade: grade), ); diff --git a/lib/searchComponent/views/resultViews/lecture_search_result_view.dart b/lib/searchComponent/views/resultViews/lecture_search_result_view.dart index c1475e31..ea2ee5aa 100644 --- a/lib/searchComponent/views/resultViews/lecture_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/lecture_search_result_view.dart @@ -8,15 +8,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; class LectureSearchResultView extends ConsumerWidget { - const LectureSearchResultView({super.key, required this.viewModel}); + const LectureSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.lectures, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: lectureSearchViewModel, body: (lecture) => LectureView( lecture: lecture, diff --git a/lib/searchComponent/views/resultViews/movie_search_result_view.dart b/lib/searchComponent/views/resultViews/movie_search_result_view.dart index 0300fe0f..0f57149b 100644 --- a/lib/searchComponent/views/resultViews/movie_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/movie_search_result_view.dart @@ -9,15 +9,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; class MovieSearchResultView extends ConsumerWidget { - const MovieSearchResultView({super.key, required this.viewModel}); + const MovieSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.movie, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: movieSearchViewModel, body: (movieSearch) => ListTile( leading: ClipRRect( diff --git a/lib/searchComponent/views/resultViews/navigatum_search_result_view.dart b/lib/searchComponent/views/resultViews/navigatum_search_result_view.dart index b73d1994..aa3c12ce 100644 --- a/lib/searchComponent/views/resultViews/navigatum_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/navigatum_search_result_view.dart @@ -9,16 +9,16 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; class NavigaTumSearchResultView extends ConsumerWidget { - const NavigaTumSearchResultView({super.key, required this.viewModel}); + const NavigaTumSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.rooms, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: navigaTumSearchViewModel, body: (entity) => ListTile( title: Text(entity.getFormattedName()), diff --git a/lib/searchComponent/views/resultViews/news_search_result_view.dart b/lib/searchComponent/views/resultViews/news_search_result_view.dart index f8b5db9f..9560fe6d 100644 --- a/lib/searchComponent/views/resultViews/news_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/news_search_result_view.dart @@ -10,15 +10,15 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; class NewsSearchResultView extends ConsumerWidget { - const NewsSearchResultView({super.key, required this.viewModel}); + const NewsSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.news, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: newsSearchViewModel, body: (newsSearch) { final imageUrl = diff --git a/lib/searchComponent/views/resultViews/person_search_result_view.dart b/lib/searchComponent/views/resultViews/person_search_result_view.dart index 21d6af36..ab2309bb 100644 --- a/lib/searchComponent/views/resultViews/person_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/person_search_result_view.dart @@ -9,15 +9,15 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; class PersonSearchResultView extends ConsumerWidget { - const PersonSearchResultView({super.key, required this.viewModel}); + const PersonSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.persons, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: personSearchViewModel, body: (person) => ListTile( title: Text(person.fullNameWithTitle), diff --git a/lib/searchComponent/views/resultViews/personal_lecture_search_result_view.dart b/lib/searchComponent/views/resultViews/personal_lecture_search_result_view.dart index 5bab6b1b..ae10edb5 100644 --- a/lib/searchComponent/views/resultViews/personal_lecture_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/personal_lecture_search_result_view.dart @@ -8,15 +8,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; class PersonalLectureSearchResultView extends ConsumerWidget { - const PersonalLectureSearchResultView({super.key, required this.viewModel}); + const PersonalLectureSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.personalLectures, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: personalLectureSearchViewModel, body: (lecture) => LectureView( lecture: lecture, diff --git a/lib/searchComponent/views/resultViews/student_club_search_result_view.dart b/lib/searchComponent/views/resultViews/student_club_search_result_view.dart index 81197896..3572b809 100644 --- a/lib/searchComponent/views/resultViews/student_club_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/student_club_search_result_view.dart @@ -9,15 +9,15 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; class StudentClubSearchResultView extends ConsumerWidget { - const StudentClubSearchResultView({super.key, required this.viewModel}); + const StudentClubSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.studentClub, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: studentClubSearchViewModel, body: (studentClubSearch) { return ListTile( diff --git a/lib/searchComponent/views/resultViews/study_room_search_result_view.dart b/lib/searchComponent/views/resultViews/study_room_search_result_view.dart index d1e68c0c..cf58dafd 100644 --- a/lib/searchComponent/views/resultViews/study_room_search_result_view.dart +++ b/lib/searchComponent/views/resultViews/study_room_search_result_view.dart @@ -7,16 +7,16 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; class StudyRoomSearchResultView extends ConsumerWidget { - const StudyRoomSearchResultView({super.key, required this.viewModel}); + const StudyRoomSearchResultView({super.key, required this.searchVM}); - final Provider viewModel; + final Provider searchVM; @override Widget build(BuildContext context, WidgetRef ref) { return SearchResultCardView( searchCategory: SearchCategory.studyRoom, - searchVM: viewModel, + searchVM: searchVM, searchCategoryVM: studyRoomSearchViewModel, body: (studyRoomSearchResult) => StudyRoomWidgetView(studyRoomSearchResult.studyRoomGroup), diff --git a/lib/searchComponent/views/search_result_view_builder.dart b/lib/searchComponent/views/search_result_view_builder.dart index 208c494d..60d1b43b 100644 --- a/lib/searchComponent/views/search_result_view_builder.dart +++ b/lib/searchComponent/views/search_result_view_builder.dart @@ -28,27 +28,27 @@ class SearchResultViewBuilder extends StatelessWidget { Widget build(BuildContext context) { switch (searchCategory) { case SearchCategory.grade: - return GradeSearchResultView(viewModel: searchVM); + return GradeSearchResultView(searchVM: searchVM); case SearchCategory.cafeterias: - return CafeteriasSearchResultView(viewModel: searchVM); + return CafeteriasSearchResultView(searchVM: searchVM); case SearchCategory.calendar: - return CalendarSearchResultView(viewModel: searchVM); + return CalendarSearchResultView(searchVM: searchVM); case SearchCategory.movie: - return MovieSearchResultView(viewModel: searchVM); + return MovieSearchResultView(searchVM: searchVM); case SearchCategory.news: - return NewsSearchResultView(viewModel: searchVM); + return NewsSearchResultView(searchVM: searchVM); case SearchCategory.studentClub: - return StudentClubSearchResultView(viewModel: searchVM); + return StudentClubSearchResultView(searchVM: searchVM); case SearchCategory.studyRoom: - return StudyRoomSearchResultView(viewModel: searchVM); + return StudyRoomSearchResultView(searchVM: searchVM); case SearchCategory.lectures: - return LectureSearchResultView(viewModel: searchVM); + return LectureSearchResultView(searchVM: searchVM); case SearchCategory.personalLectures: - return PersonalLectureSearchResultView(viewModel: searchVM); + return PersonalLectureSearchResultView(searchVM: searchVM); case SearchCategory.persons: - return PersonSearchResultView(viewModel: searchVM); + return PersonSearchResultView(searchVM: searchVM); case SearchCategory.rooms: - return NavigaTumSearchResultView(viewModel: searchVM); + return NavigaTumSearchResultView(searchVM: searchVM); default: return Container(); }