Simple and clean flutter calendar with ability to slide up/down to show weekly/monthly calendar. Forked from [flutter_clean_calender](https://pub.dev/packages/flutter_clean_calendar)
MIT License
104
stars
51
forks
source link
Exception if you change month and go to another year #73
If you change the month and switch to another year, an exception is thrown. So to be precise, when you change from December to January and vice versa, an exception occurs.
The error occurs when navigating using the swipe gesture or using the arrow buttons.
Tested with Version: 0.3.17+37
A workaround is this: onMonthChanged: (_) {}
Exception:
FlutterErrorDetails (══╡ EXCEPTION CAUGHT BY GESTURE ╞════════════════════════════════
The following _TypeError was thrown while handling a gesture:
Null check operator used on a null value
When the exception was thrown, this was the stack:
#0 _CalendarState._launchDateSelectionCallback (package:flutter_neat_and_clean_calendar/flutter_neat_and_clean_calendar.dart:1051:28)
#1 _CalendarState.nextMonth (package:flutter_neat_and_clean_calendar/flutter_neat_and_clean_calendar.dart:834:7)
#2 _CalendarState._onSwipeLeft (package:flutter_neat_and_clean_calendar/flutter_neat_and_clean_calendar.dart:972:7)
#3 _SimpleGestureDetectorState._onHorizontalDragUpdate (package:flutter_neat_and_clean_calendar/simple_gesture_detector.dart:98:32)
#4 DragGestureRecognizer._checkUpdate.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:581:55)
#5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:315:24)
#6 DragGestureRecognizer._checkUpdate (package:flutter/src/gestures/monodrag.dart:581:7)
#7 DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:422:9)
#8 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#9 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#10 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#11 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#12 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#13 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:495:19)
#14 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:475:22)
#15 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:430:11)
#16 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:420:7)
#17 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:383:5)
#18 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:330:7)
#19 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:299:9)
#23 _invoke1 (dart:ui/hooks.dart:330:10)
#24 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:429:7)
#25 _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31)
(elided 3 frames from dart:async)
Handler: "onUpdate"
Recognizer:
HorizontalDragGestureRecognizer#7bfbc
═════════════════════════════════════════════════════════════════
)
If you change the month and switch to another year, an exception is thrown. So to be precise, when you change from December to January and vice versa, an exception occurs. The error occurs when navigating using the swipe gesture or using the arrow buttons.
Tested with Version: 0.3.17+37
A workaround is this:
onMonthChanged: (_) {}
Exception: