Emex4gman / json_form_generator

A flutter package to help convert json to form.
Apache License 2.0
9 stars 3 forks source link

date #3

Open unimas63952 opened 3 years ago

unimas63952 commented 3 years ago

i couldnt add date into the form and wont let me select the date

suganthisam912 commented 3 years ago

I cant able to select the date and showing me an error

[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: 'package:flutter/src/material/date_picker.dart': Failed assertion: line 150 pos 5: '!initialDate.isAfter(lastDate)': initialDate 2021-05-27 00:00:00.000 must be on or before lastDate 2021-01-01 00:00:00.000. E/flutter (21697): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39) E/flutter (21697): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5) E/flutter (21697): #2 showDatePicker (package:flutter/src/material/date_picker.dart:150:5) E/flutter (21697): #3 _JsonFormGeneratorState.jsonToForm._selectDate (package:json_form_generator/json_form_generator.dart:144:35) E/flutter (21697): #4 _JsonFormGeneratorState.jsonToForm._selectDate (package:json_form_generator/json_form_generator.dart:143:27) E/flutter (21697): #5 _JsonFormGeneratorState.jsonToForm. (package:json_form_generator/json_form_generator.dart:182:36) E/flutter (21697): #6 _JsonFormGeneratorState.jsonToForm. (package:json_form_generator/json_form_generator.dart:181:24) E/flutter (21697): #7 _TextFieldSelectionGestureDetectorBuilder.onSingleTapUp (package:flutter/src/material/text_field.dart:120:27) E/flutter (21697): #8 _TextSelectionGestureDetectorState._handleTapUp (package:flutter/src/widgets/text_selection.dart:1368:30) E/flutter (21697): #9 TapGestureRecognizer.handleTapUp. (package:flutter/src/gestures/tap.dart:605:57) E/flutter (21697): #10 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (21697): #11 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:605:11) E/flutter (21697): #12 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:296:5) E/flutter (21697): #13 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:267:7) E/flutter (21697): #14 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27) E/flutter (21697): #15 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:385:20) E/flutter (21697): #16 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:361:22) E/flutter (21697): #17 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:278:11) E/flutter (21697): #18 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:316:7) E/flutter (21697): #19 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:280:5) E/flutter (21697): #20 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:238:7) E/flutter (21697): #21 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:221:7) E/flutter (21697): #22 _rootRunUnary (dart:async/zone.dart:1370:13) E/flutter (21697): #23 _CustomZone.runUnary (dart:async/zone.dart:1265:19) E/flutter (21697): #24 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7) E/flutter (21697): #25 _invoke1 (dart:ui/hooks.dart:180:10) E/flutter (21697): #26 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:276:7) E/flutter (21697): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31) E/flutter (21697):