Skip to content

Commit

Permalink
added timtable animations
Browse files Browse the repository at this point in the history
  • Loading branch information
miakh committed Jan 23, 2024
1 parent 92203da commit 8d6741e
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 201 deletions.
2 changes: 1 addition & 1 deletion lib/data/DataService.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:avapp/services/DialogHelper.dart';
import 'package:avapp/services/NotificationHelper.dart';
import 'package:avapp/services/ToastHelper.dart';
import 'package:avapp/services/UserManagementHelper.dart';
import 'package:avapp/widgets/TimeTable.dart';
import 'package:avapp/widgets/Timetable.dart';
import 'package:collection/collection.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
Expand Down
10 changes: 7 additions & 3 deletions lib/pages/ProgramViewPage.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:avapp/data/DataService.dart';
import 'package:avapp/pages/ProgramPage.dart';
import 'package:avapp/services/NavigationHelper.dart';
import 'package:avapp/widgets/TimeTable.dart';
import 'package:avapp/widgets/Timetable.dart';
import 'package:collection/collection.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
Expand All @@ -22,6 +22,8 @@ class _ProgramViewPageState extends State<ProgramViewPage>
with TickerProviderStateMixin {
late TabController _tabController;

var timetableController = TimetableController();

@override
void initState() {
super.initState();
Expand Down Expand Up @@ -52,6 +54,7 @@ class _ProgramViewPageState extends State<ProgramViewPage>
_tabController.addListener(() {
setState(() {
_currentIndex = _tabController.index;
timetableController.reset?.call();
});
});
await loadEventParticipants();
Expand Down Expand Up @@ -120,13 +123,14 @@ class _ProgramViewPageState extends State<ProgramViewPage>
),
],
),
body: TimeTable(
body: Timetable(
controller: timetableController,
items: _items
.where((element) =>
element.startTime.weekday ==
_days.keys.toList()[_currentIndex])
.toList(),
timetablePlaces: _timetablePlaces),
timetablePlaces: _timetablePlaces)
);
}

Expand Down
Loading

0 comments on commit 8d6741e

Please sign in to comment.