Fix timetable not displaying in profile-mode
This commit is contained in:
		@@ -1,6 +1,4 @@
 | 
			
		||||
 | 
			
		||||
import 'dart:developer';
 | 
			
		||||
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:marianum_mobile/data/timetable/timetableProps.dart';
 | 
			
		||||
import 'package:marianum_mobile/screen/pages/timetable/weekView.dart';
 | 
			
		||||
@@ -26,8 +24,6 @@ class _TimetableState extends State<Timetable> {
 | 
			
		||||
  
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
    double movement = 0;
 | 
			
		||||
 | 
			
		||||
    return Consumer<TimetableProps>(
 | 
			
		||||
      builder: (context, value, child) {
 | 
			
		||||
        if(value.primaryLoading()) {
 | 
			
		||||
@@ -39,14 +35,8 @@ class _TimetableState extends State<Timetable> {
 | 
			
		||||
          children: [
 | 
			
		||||
            Expanded(
 | 
			
		||||
              child: GestureDetector(
 | 
			
		||||
                child: Positioned(
 | 
			
		||||
                  left: movement,
 | 
			
		||||
                  child: WeekView(value),
 | 
			
		||||
                ),
 | 
			
		||||
                onHorizontalDragUpdate: (details) {
 | 
			
		||||
                  log("${details.globalPosition.dx}");
 | 
			
		||||
                  movement = details.globalPosition.dx;
 | 
			
		||||
                },
 | 
			
		||||
                child: WeekView(value),
 | 
			
		||||
                //onDoubleTap: () => timetable.nearest(),
 | 
			
		||||
                onHorizontalDragEnd: (details) {
 | 
			
		||||
                  if(details.primaryVelocity! < 0) {
 | 
			
		||||
                    timetable.switchWeek();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user