date_picker_lunar_calendar 0.0.8
date_picker_lunar_calendar: ^0.0.8 copied to clipboard
This plugin allows to pick date with lunar calendar, solar calendar and can convert from solar date to lunar date.
Date Picker Lunar Calendar #
This plugin allows to pick date with lunar calendar, solar calendar and can convert from solar date to lunar date.
How to Use #
Import this library into your code:
import 'package:month_year_picker/month_year_picker.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
Additionally, ensure your MaterialApp refers to the following localizationsDelegates:
GlobalWidgetsLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
MonthYearPickerLocalizations.delegate,
Pick DateTime:
import 'package:base_image/base_image.dart';
DateTime? dateResponse = await DatePickerLunarCalendar().selectDate(context,initDate: dateSelected,endDate: DateTime.now(),beginDate: DateTime(2024,12,01));
Convert solar date to lunar date:
import 'package:base_image/base_image.dart';
DatePickerLunarCalendar().convertSolarToLunar(dateSelected!)