Nepali date picker - Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support

Overview

Nepali Date Picker + Calendar

Pub Package Licence Demo effective dart

Material and Cupertino Styled Date Picker, Date Range Picker and Calendar with Bikram Sambat(Nepali) Support.

Loading Demo

Nepali Date Picker returns data in NepaliDateTime type, which is included in nepali_utils package.

Click here to launch WEB DEMO

Loading Demo Loading Demo

Salient Features

  • Material DatePicker
  • Cupertino DatePicker
  • Adaptive DatePicker
  • Calendar Picker
  • Material Date Range Picker
  • Calendar Range Picker
  • Supports from 1970 B.S. to 2100 B.S.

Note

Use Version 5.0.0 for flutter < 2.1.0

Usage

Material Style Date Picker

import 'package:nepali_date_picker/nepali_date_picker.dart' as picker;

NepaliDateTime _selectedDateTime = await picker.showMaterialDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    initialDatePickerMode: DatePickerMode.day,
);

print(_selectedDateTime); // 2076-02-16T00:00:00

Cupertino Style Date Picker

picker.showCupertinoDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    language: _language,
    dateOrder: _dateOrder,
    onDateChanged: (newDate) {
        print(_selectedDateTime);
    },
);

Adaptive Date Picker

Shows DatePicker based on Platform. i.e. Cupertino DatePicker will be shown on iOS while Material on Android and Fuchsia.

NepaliDateTime _selectedDateTime = await picker.showAdaptiveDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    language: _language,
    dateOrder: _dateOrder, // for iOS only
    initialDatePickerMode: DatePickerMode.day, // for platform except iOS
);

Calender Picker

Shows Calendar, can be used for showing events.

CalendarDatePicker(
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2070),
    lastDate: NepaliDateTime(2090),
    onDateChanged: (date) => _selectedDate.value = date,
    dayBuilder: (dayToBuild) { // Optional
      return Center(
                child: Text(
                    '${dayToBuild.day}',
                    style: Theme.of(context).textTheme.caption,
               ),
          ),
      },
     selectedDayDecoration: BoxDecoration ( // Optional
            color: Colors.deepOrange,
            shape: BoxShape.circle,
     ),
     todayDecoration: BoxDecoration ( // Optional
            gradient: LinearGradient(colors: [Colors.yellow, Colors.orange]),
            shape: BoxShape.circle,
     ),
};

Screenshots

Material Design (Portrait)

Portrait Screenshot

Material Design (Landscape)

Landscape Screenshot

Cupertino Design

Cupertino English

Cupertino Nepali

Example

Detailed Example

License

Copyright 2020 Sarbagya Dhaubanjar. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.
    * Neither the name of Google Inc. nor the names of its
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comments
  • Render Box

    Render Box

    The following assertion was thrown during performLayout(): I/flutter ( 8768): RenderViewport does not support returning intrinsic dimensions. I/flutter ( 8768): Calculating the intrinsic dimensions would require instantiating every child of the viewport, which I/flutter ( 8768): defeats the point of viewports being lazy. I/flutter ( 8768): If you are merely trying to shrink-wrap the viewport in the main axis direction, consider a I/flutter ( 8768): RenderShrinkWrappingViewport render object (ShrinkWrappingViewport widget), which achieves that I/flutter ( 8768): effect without implementing the intrinsic dimension API. ......

    Launching lib/main.dart on SM J400F in debug mode... Built build/app/outputs/apk/debug/app-debug.apk. D/libGLESv2( 8768): STS_GLApi : DTS, ODTC are not allowed for Package : com.sochware.nagarpalika D/ViewRootImpl@f75e912MainActivity: ViewPostIme pointer 0 D/ViewRootImpl@f75e912MainActivity: ViewPostIme pointer 1 I/flutter ( 8768): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter ( 8768): The following assertion was thrown during performLayout(): I/flutter ( 8768): RenderViewport does not support returning intrinsic dimensions. I/flutter ( 8768): Calculating the intrinsic dimensions would require instantiating every child of the viewport, which I/flutter ( 8768): defeats the point of viewports being lazy. I/flutter ( 8768): If you are merely trying to shrink-wrap the viewport in the main axis direction, consider a I/flutter ( 8768): RenderShrinkWrappingViewport render object (ShrinkWrappingViewport widget), which achieves that I/flutter ( 8768): effect without implementing the intrinsic dimension API. I/flutter ( 8768): I/flutter ( 8768): When the exception was thrown, this was the stack: I/flutter ( 8768): #0 RenderViewportBase.debugThrowIfNotCheckingIntrinsics. (package:flutter/src/rendering/viewport.dart:299:9) I/flutter ( 8768): #1 RenderViewportBase.debugThrowIfNotCheckingIntrinsics (package:flutter/src/rendering/viewport.dart:309:6) I/flutter ( 8768): #2 RenderViewportBase.computeMaxIntrinsicWidth (package:flutter/src/rendering/viewport.dart:321:12) I/flutter ( 8768): #3 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #4 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #5 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #6 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #8 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #9 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #10 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #11 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #12 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #13 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #14 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #15 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #16 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #17 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #18 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #19 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #20 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #21 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #22 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #23 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #24 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #25 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #26 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #27 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #28 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #29 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #30 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #31 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #32 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #33 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #34 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #35 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #36 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #37 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #38 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #39 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #40 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #41 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #42 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #43 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #44 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #45 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #46 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #47 RenderFlex.computeMaxIntrinsicWidth. (package:flutter/src/rendering/flex.dart:575:60) I/flutter ( 8768): #48 RenderFlex._getIntrinsicSize (package:flutter/src/rendering/flex.dart:552:58) I/flutter ( 8768): #49 RenderFlex.computeMaxIntrinsicWidth (package:flutter/src/rendering/flex.dart:572:12) I/flutter ( 8768): #50 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #51 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #52 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #53 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #54 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:76:20) I/flutter ( 8768): #55 RenderConstrainedBox.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:226:32) I/flutter ( 8768): #56 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #57 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #58 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #59 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #60 RenderPadding.computeMaxIntrinsicWidth (package:flutter/src/rendering/shifted_box.dart:163:20) I/flutter ( 8768): #61 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #62 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #63 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #64 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #65 RenderFlex.computeMaxIntrinsicWidth. (package:flutter/src/rendering/flex.dart:575:60) I/flutter ( 8768): #66 RenderFlex._getIntrinsicSize (package:flutter/src/rendering/flex.dart:552:58) I/flutter ( 8768): #67 RenderFlex.computeMaxIntrinsicWidth (package:flutter/src/rendering/flex.dart:572:12) I/flutter ( 8768): #68 RenderBox._computeIntrinsicDimension. (package:flutter/src/rendering/box.dart:1099:23) I/flutter ( 8768): #69 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:284:23) I/flutter ( 8768): #70 RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1097:41) I/flutter ( 8768): #71 RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1281:12) I/flutter ( 8768): #72 RenderIntrinsicWidth.performLayout (package:flutter/src/rendering/proxy_box.dart:617:36) I/flutter ( 8768): #73 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #74 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #76 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #78 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #80 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #81 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1188:11) I/flutter ( 8768): #82 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #83 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:258:13) I/flutter ( 8768): #84 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #85 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:385:13) I/flutter ( 8768): #86 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #87 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11) I/flutter ( 8768): #88 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #89 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:207:13) I/flutter ( 8768): #90 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #91 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11) I/flutter ( 8768): #92 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #93 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #94 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #95 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #96 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #97 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #98 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #99 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #100 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #101 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #102 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #103 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #104 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #105 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter ( 8768): #106 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2881:13) I/flutter ( 8768): #107 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter ( 8768): #108 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15) I/flutter ( 8768): #109 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7) I/flutter ( 8768): #110 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:768:18) I/flutter ( 8768): #111 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19) I/flutter ( 8768): #112 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:677:13) I/flutter ( 8768): #113 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5) I/flutter ( 8768): #114 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) I/flutter ( 8768): #115 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) I/flutter ( 8768): #116 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) I/flutter ( 8768): #117 _invoke (dart:ui/hooks.dart:154:13) I/flutter ( 8768): #118 _drawFrame (dart:ui/hooks.dart:143:3) I/flutter ( 8768): I/flutter ( 8768): The following RenderObject was being processed when the exception was fired: I/flutter ( 8768): RenderIntrinsicWidth#2cd5c relayoutBoundary=up6 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): creator: IntrinsicWidth ← Semantics ← DefaultTextStyle ← AnimatedDefaultTextStyle ← I/flutter ( 8768): _InkFeatures-[GlobalKey#18522 ink renderer] ← NotificationListener ← I/flutter ( 8768): CustomPaint ← _ShapeBorderPaint ← PhysicalShape ← _MaterialInterior ← Material ← ConstrainedBox ← I/flutter ( 8768): ⋯ I/flutter ( 8768): parentData: (can use size) I/flutter ( 8768): constraints: BoxConstraints(280.0<=w<=331.4, 0.0<=h<=659.4) I/flutter ( 8768): size: MISSING I/flutter ( 8768): stepWidth: null I/flutter ( 8768): stepHeight: null I/flutter ( 8768): This RenderObject had the following descendants (showing up to depth 5): I/flutter ( 8768): RenderFlex#ca7c7 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderPadding#9a7b2 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderConstrainedBox#709d3 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderFlex#c11ea NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderDecoratedBox#7480b NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderRepaintBoundary#b9b72 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderPadding#38cd8 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderFlex#d7ee6 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderPadding#b1eb7 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderSemanticsAnnotations#34dcc NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderPadding#de50f NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): RenderSemanticsAnnotations#c4d32 NEEDS-LAYOUT NEEDS-PAINT I/flutter ( 8768): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: RenderIntrinsicWidth#2cd5c relayoutBoundary=up6 NEEDS-PAINT I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#60bff relayoutBoundary=up5 NEEDS-PAINT I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#6af86 relayoutBoundary=up4 NEEDS-PAINT I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#d389e relayoutBoundary=up3 NEEDS-PAINT I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#421e1 relayoutBoundary=up2 NEEDS-PAINT I/flutter ( 8768): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 314 pos 12: 'child.hasSize': is not true. I/flutter ( 8768): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#421e1 relayoutBoundary=up2 D/ViewRootImpl@f75e912MainActivity: MSG_WINDOW_FOCUS_CHANGED 1

    opened by SahSantoshh 6
  • Fix: Changed RegExp in input validation

    Fix: Changed RegExp in input validation

    RegExp before would not let user to type dates including 10 or 20. eg: 2078/01/10 and 2078/01/20. Changing the RegExp as (0[1-9]|1[0-9]|2[0-9]|3[0-2]) for day field will work fine.

    opened by Amritacharya 1
  • I'm getting this while just importing nepali_date_picker package.

    I'm getting this while just importing nepali_date_picker package.

    Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 2.3.0-1.0.pre.267, on Microsoft Windows [Version 10.0.19042.928], locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Chrome - develop for the web [✓] Android Studio (version 4.1.0) [✓] VS Code (version 1.56.0) [✓] Connected device (3 available) • No issues found! Running "flutter pub get" in baigundhura_computer... 6.1s Launching lib\main.dart on BE2013 in debug mode... /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_picker_dialog.dart:291:8: Error: A non-null value must be returned since the return type 'Size' doesn't allow null.

    • 'Size' is from 'dart:ui'. Size _dialogSize(BuildContext context) { ^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_picker_dialog.dart:447:24: Error: Final variable 'entryModeButton' must be assigned before it can be used. entryModeButton: entryModeButton, ^^^^^^^^^^^^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_picker_dialog.dart:470:39: Error: Non-nullable variable 'picker' must be assigned before it can be used. Expanded(child: picker), ^^^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_picker_dialog.dart:485:45: Error: Non-nullable variable 'picker' must be assigned before it can be used. Expanded(child: picker), ^^^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_range_picker_dialog.dart...: Error: Non-nullable variable 'size' must be assigned before it can be used. width: size.width, ^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_range_picker_dialog.dart...: Error: Non-nullable variable 'size' must be assigned before it can be used. height: size.height, ^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_range_picker_dialog.dart...: Error: Non-nullable variable 'contents' must be assigned before it can be used. return contents; ^^^^^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_range_picker_dialog.dart...: Error: Non-nullable variable 'insetPadding' must be assigned before it can be used. insetPadding: insetPadding, ^^^^^^^^^^^^ /C:/Users/Lenovo/AppData/Local/Pub/Cache/hosted/http://pub.dartlang.org/.../date_range_picker_dialog.dart...: Error: Non-nullable variable 'elevation' must be assigned before it can be used. elevation: elevation, ^^^^^^^^^ FAILURE: Build failed with an exception.
    • Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
    • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    • Get more help at https://help.gradle.org BUILD FAILED in 1m 57s Running Gradle task 'assembleDebug'... 119.9s Exception: Gradle task assembleDebug failed with exit code 1
    opened by codernirdesh 1
  • CalendarDatePicker in Nepali language

    CalendarDatePicker in Nepali language

    How can we change the language in #CalendarDatePicker widget? I tried using util package in initstate but it is only changing the weeks and month name not the date numbers?

    image void initState() { // TODO: implement initState super.initState(); NepaliUtils().language = Language.nepali; }

    opened by TAMU73 1
  • Nepali font not showing and CalendarDatePicker widget Not working

    Nepali font not showing and CalendarDatePicker widget Not working

    I want to show a calendar of Nepali font calendar which is not happenning even if i used language parameter in showAdaptiveDatePicker. _selectedDateTime = await showAdaptiveDatePicker( context: context, initialDate: NepaliDateTime.now(), firstDate: NepaliDateTime(2077), lastDate: NepaliDateTime(2090), language: Language.nepali, initialDatePickerMode: DatePickerMode.day, );

    Also I want to use calendar in the main display not in a picker(popup) form. For this I used CalendarDatePicker widget which cannot be used. Am I doing wrong or ? Column( mainAxisAlignment: MainAxisAlignment.center, children: [ CalendarDatePicker( initialDate: NepaliDateTime.now(), firstDate: NepaliDateTime(2070), lastDate: NepaliDateTime(2090), onDateChanged: (date) => _selectedDate.value = date, dayBuilder: (dayToBuild) { // Optional return Center( child: Text( '${dayToBuild.day}', style: Theme .of(context) .textTheme .caption, ), ); }, selectedDayDecoration: BoxDecoration( // Optional color: Colors.deepOrange, shape: BoxShape.circle, ), todayDecoration: BoxDecoration( // Optional gradient: LinearGradient( colors: [Colors.yellow, Colors.orange]), shape: BoxShape.circle, ), ), ], ),

    question 
    opened by TAMU73 1
  • Added changes in date picker for DateRangePicker

    Added changes in date picker for DateRangePicker

    The previous code snippet did not allow selecting an initial date past the end date. Also, there was an issue with the null check where the method was called after setting the value to null with the argument passed with a null check.

    I have resolved those issues for DateTimeRangePicker.

    opened by IchinoseBinit 3
Owner
Sarbagya Dhaubanjar
Senior Software Engineer at @khalti
Sarbagya Dhaubanjar
Flutter cupertino style date picker.

Flutter Cupertino Date Picker [pub packages] | 中文说明 Flutter cupertino date picker. Usage 1. Depend Add this to you package's pubspec.yaml file: depend

Dylan Wu 333 Dec 26, 2022
Flutter cupertino style date picker.

Flutter Cupertino Date Picker [pub packages] | 中文说明 Flutter cupertino date picker. Usage 1. Depend Add this to you package's pubspec.yaml file: depend

Dylan Wu 333 Dec 26, 2022
Ali Türkay AVCI 1 Jan 20, 2022
Custom calendar dialog widget for flutter with (multi select, single select, date range) mode

some calendar Custom calendar with Multi-select & range configurable calendar New Features Added View Mode Somecalendar #15 Help Maintenance I've take

Irvan Lutfi Gunawan 69 Jan 3, 2023
Neumorphic style - Example app with Flutter that displays a neumorphic style container

Flutter Neumorphic Style Example App Example app with Flutter that displays a ne

Piyush Nagpal 2 Mar 24, 2022
A Very Flexible Widget that can Implement Material Sheets on all Directions, both modal and persistent, and consequently a Material Navigation Drawer

Flutter_MaterialSheetAndNavigationDrawer If this project helped you reduce developement time or you just want to help me continue making useful tools

Bryan Cancel 30 Dec 4, 2021
Material io ext - A collection of extensions for creating widgets following material.io guidelines

material_io_ext It is a collection of extensions for creating widgets following

BetterX.io 3 Jan 28, 2022
Material color picker, you can customize colors. Selection in two step, first main color and after shades.

Flutter Material Color Picker Material Color picker is a Flutter widget, that can be customizable. By default, it's Material Colors, but you can defin

Jean-Charles Moussé 70 Nov 25, 2022
A Flutter widget to set time with spinner instead of material time picker

flutter_time_picker_spinner Time Picker widget with spinner instead of a material time picker. 12H format 24H format 24H format with second Custom sty

Bobby Stenly Irawan 34 Aug 8, 2022
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.

image_editor The version of readme pub and github may be inconsistent, please refer to github. Use native(objc,kotlin) code to handle image data, it i

FlutterCandies 317 Jan 3, 2023
Color picker for Flutter, based on the Google Docs color picker.

Material ColorPicker Color picker for Flutter, based on the Google Docs color picker. Getting Started You can embed into your material app or use it o

Razvan Lung 103 Oct 30, 2022
Form builder image picker - Form builder image picker for flutter

form_builder_image_picker Field for picking image(s) from Gallery or Camera for

Ferri Sutanto 0 Jan 28, 2022
无第三方依赖的公历(阳历)和农历(阴历、老黄历)工具,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.

lunar lunar是一款无第三方依赖的公历(阳历)和农历(阴历、老黄历)工具,支持星座、儒略日、干支、生肖、节气、节日、彭祖百忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶、法定节假日及调休等。 Eng

6tail 63 Dec 27, 2022
Calendar application writtern in flutter/dart.

Flutter Application A new Flutter application implementing a simple mobile calendar app for storing basic events into Firebase cloud database. Google

Matt Graham 75 Sep 13, 2022
📅 Customizable flutter calendar widget including day and week views

?? Customizable, animated calendar widget including day, week, and month views. Navigation Animation Callbacks Changing the VisibleDateRange Available

Jonas Wanke 276 Jan 1, 2023
Booking calendar - Flutter package to manage online bookings

Booking Calendar Want to make online bookings in your app? Then luckily you need

null 35 Dec 18, 2022
The flutter_calendar_widget is highly customizable calendar widget.

flutter_calendar_widget The flutter_calendar_widget is highly customizable calendar widget. Not only can you change the style, but you can also change

dooboolab 4 Jun 24, 2022
Clean, beautiful and customisable calendar package for flutter

Word from creator Hello ?? , Yeah I know Clean calendar is still very new, but don't be put off by it because it will be well-maintained for a very, v

Deepanshu Chaudhary 8 Dec 15, 2022
Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop

Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop Using Yaru To be able to use this package follow this steps: Installation Make you su

Ubuntu 226 Dec 28, 2022