Package-level declarations

Types

Link copied to clipboard
fun interface NepaliDialogHandle

A live dialog shown by showNepaliDatePickerDialog or showNepaliDatePickerFullScreenDialog. dismiss closes it without invoking either caller callback, for a host tearing down while the dialog is still up.

Link copied to clipboard
class NepaliEventInfo(val year: Int, val month: Int, val dayOfMonth: Int, val name: String, val kind: NepaliEventKind, closesOffices: Boolean? = null, val colorArgb: Int = 0, val indicate: Boolean = false, val id: String? = null, val payload: String? = null)

One thing on one day, as a View-based caller describes it: a public holiday, a festival, a programme, a meeting. Mirrors the iOS NepaliEventInfo field for field.

Link copied to clipboard
class NepaliEventOptions(val weeklyOffDays: List<Int> = NepaliWeekend.Default.toList(), val events: List<NepaliEventInfo> = emptyList(), val markWeeklyOff: Boolean = true, val markEvents: Boolean = true, val tintContainer: Boolean = false, val indicateWeeklyOff: Boolean = false, val describeEvents: Boolean = true, val weeklyOffColorArgb: Int = 0, val publicHolidayColorArgb: Int = 0, val religiousColorArgb: Int = 0, val regionalColorArgb: Int = 0, val observanceColorArgb: Int = 0, val markedContainerColorArgb: Int = 0)

What the pickers should mark, for a View-based caller. Mirrors the iOS NepaliEventOptions field for field, so one description themes both hosts.

Link copied to clipboard

The colours every hosted picker, field and dialog draws with, shared by the whole app.

Link copied to clipboard

Which brightness the hosted pickers draw at.

Functions

Link copied to clipboard
fun NepaliCalendarSystemToggleView(context: Context, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, language: NepaliDatePickerLang = NepaliDatePickerLang.ENGLISH, onHeightChange: (Float) -> Unit = {}, onCalendarSystemChange: (CalendarSystem) -> Unit): View

The Bikram Sambat and Gregorian toggle as a plain View. Mirrors the iOS NepaliCalendarSystemToggleViewController.

Link copied to clipboard
fun NepaliCalendarView(context: Context, initialSelectedDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, showTodayButton: Boolean = true, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = true, showSecondaryDates: Boolean = true, secondaryDateLocale: NepaliDateLocale? = null, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showDaySummary: Boolean = false, showMonthEvents: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onEventTapped: (NepaliCalendarEvent) -> Unit = {}, onDaySelected: (CustomCalendar, NepaliDayStatus) -> Unit): View

The browsable month calendar as a plain View, for hosts that cannot compose: a Flutter platform view or an XML layout. Mirrors the iOS NepaliCalendarViewController parameter for parameter.

Link copied to clipboard
fun NepaliDateFieldView(context: Context, initialValue: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, dateFormat: NepaliDateFormatter.Pattern = Pattern.YYYY_SLASH_MM_SLASH_DD, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, outlined: Boolean = true, label: String? = null, placeholder: String? = null, supportingText: String? = null, isError: Boolean = false, enabled: Boolean = true, readOnly: Boolean = false, confirmButtonText: String? = null, dismissButtonText: String? = null, cornerRadius: Float = EmbeddedPickerDefaults.FIELD_CORNER_RADIUS, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onValueChange: (SimpleDate?) -> Unit): View

The date text field, with an optional picker dialog behind it, as a plain View. Mirrors the iOS NepaliDateFieldViewController parameter for parameter.

Link copied to clipboard
fun NepaliDatePickerDockedView(context: Context, initialSelectedDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, dateFormatStyle: NepaliDateFormatStyle = NepaliDateFormatStyle.MEDIUM, showTodayButton: Boolean = true, label: String? = null, placeholder: String? = null, cornerRadius: Float = EmbeddedPickerDefaults.FIELD_CORNER_RADIUS, popupShadowElevation: Float = EmbeddedPickerDefaults.DOCKED_POPUP_ELEVATION, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onDateSelected: (CustomCalendar?) -> Unit): View

The docked picker, a text field opening a calendar popup, as a plain View. Mirrors the iOS NepaliDatePickerDockedViewController.

Link copied to clipboard
fun NepaliDatePickerView(context: Context, initialSelectedDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showEnglishDate: Boolean = false, englishDateLocale: NepaliDateLocale? = null, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onDateSelected: (CustomCalendar?) -> Unit): View

The calendar picker as a plain View, for hosts that cannot compose: a Flutter platform view or an XML layout. Mirrors the iOS NepaliDatePickerViewController parameter for parameter.

Link copied to clipboard
fun NepaliDateRangeFieldView(context: Context, initialStartValue: SimpleDate? = null, initialEndValue: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultRangePickerLocale, dateFormat: NepaliDateFormatter.Pattern = Pattern.YYYY_SLASH_MM_SLASH_DD, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, outlined: Boolean = true, startLabel: String? = null, endLabel: String? = null, supportingText: String? = null, isStartError: Boolean = false, isEndError: Boolean = false, enabled: Boolean = true, readOnly: Boolean = false, confirmButtonText: String? = null, dismissButtonText: String? = null, cornerRadius: Float = EmbeddedPickerDefaults.FIELD_CORNER_RADIUS, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onRangeChange: (SimpleDate?, SimpleDate?) -> Unit): View

The range text field, with an optional picker dialog behind it, as a plain View. Mirrors the iOS NepaliDateRangeFieldViewController.

Link copied to clipboard
fun NepaliDateRangePickerView(context: Context, initialSelectedStartDate: SimpleDate? = null, initialSelectedEndDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultRangePickerLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showMonthsVertically: Boolean = true, showYearPickerAndMonthNavigation: Boolean = true, showEnglishDate: Boolean = false, englishDateLocale: NepaliDateLocale? = null, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onRangeSelected: (CustomCalendar?, CustomCalendar?) -> Unit): View

The range picker as a plain View, for hosts that cannot compose. Mirrors the iOS NepaliDateRangePickerViewController parameter for parameter.

Link copied to clipboard
fun NepaliDaySummaryView(context: Context, date: SimpleDate, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}): View

One day written out as a plain View: whether the institution is shut, why, and what is named on it. Mirrors the iOS NepaliDaySummaryViewController.

Link copied to clipboard
fun NepaliMonthEventListView(context: Context, year: Int, month: Int, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, events: NepaliEventOptions? = null, onHeightChange: (Float) -> Unit = {}, onEventTapped: (NepaliCalendarEvent) -> Unit = {}): View

The month's event list as a plain View. Mirrors the iOS NepaliMonthEventListViewController.

Link copied to clipboard
fun NepaliWheelDatePickerView(context: Context, initialDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, itemHeight: Float = EmbeddedPickerDefaults.WHEEL_ITEM_HEIGHT, visibleItemCount: Int = EmbeddedPickerDefaults.WHEEL_VISIBLE_ITEM_COUNT, cornerRadius: Float = EmbeddedPickerDefaults.WHEEL_CORNER_RADIUS, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, onHeightChange: (Float) -> Unit = {}, onDateChange: (CustomCalendar) -> Unit): View

The wheel picker as a plain View. Mirrors the iOS NepaliWheelDatePickerViewController.

Link copied to clipboard
fun showNepaliDatePickerDialog(activity: Activity, initialSelectedDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showEnglishDate: Boolean = false, englishDateLocale: NepaliDateLocale? = null, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, confirmText: String = EmbeddedPickerDefaults.DIALOG_CONFIRM_TEXT, dismissText: String = EmbeddedPickerDefaults.DIALOG_DISMISS_TEXT, tonalElevation: Float = EmbeddedPickerDefaults.DIALOG_TONAL_ELEVATION, cornerRadius: Float = EmbeddedPickerDefaults.DIALOG_CORNER_RADIUS, onConfirm: (CustomCalendar?) -> Unit, onDismiss: () -> Unit): NepaliDialogHandle

Shows the picker in a modal dialog over activity's content, closing itself on either button. Mirrors the iOS NepaliDatePickerDialogViewController parameter for parameter.

Link copied to clipboard
fun showNepaliDatePickerFullScreenDialog(activity: Activity, initialSelectedDate: SimpleDate? = null, locale: NepaliDateLocale = NepaliDatePickerDefaults.DefaultLocale, yearRange: IntRange = NepaliCalendarDefaults.NepaliYearRange, selectableDates: NepaliSelectableDates? = null, showModeToggle: Boolean = true, showTodayButton: Boolean = true, showEnglishDate: Boolean = false, englishDateLocale: NepaliDateLocale? = null, initialCalendarSystem: CalendarSystem = CalendarSystem.BIKRAM_SAMBAT, showCalendarSystemToggle: Boolean = false, showAdjacentMonthDays: Boolean = false, events: NepaliEventOptions? = null, title: String? = null, confirmText: String = EmbeddedPickerDefaults.DIALOG_CONFIRM_TEXT, dismissText: String = EmbeddedPickerDefaults.DIALOG_DISMISS_TEXT, onConfirm: (CustomCalendar?) -> Unit, onDismiss: () -> Unit): NepaliDialogHandle

Shows the picker in a full-screen dialog over activity's content, closing itself on either button. Mirrors the iOS NepaliDatePickerFullScreenDialogViewController.