HijriCalendarDelegate class
A Material calendar delegate that accepts only HijriDateTime values.
All date inputs and non-null localization parser results are checked at runtime. Incompatible values throw ArgumentError; convert Gregorian or other-calendar instants with HijriDateTime.fromDateTime explicitly. Date-only and navigation results use the picker's local-midnight policy.
- Inheritance
-
- Object
- CalendarDelegate<
DateTime> - HijriCalendarDelegate
Constructors
- HijriCalendarDelegate()
-
Creates a calendar delegate that uses the Hijri calendar and the
conventions of the current MaterialLocalizations.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
rangePickerDelegate
→ CalendarDelegate<
DateTime> -
Delegate for showDateRangePicker, including supported-range endpoints.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDaysToDate(
DateTime date, int days) → DateTime -
Returns a DateTime with the added number of days and time set to
midnight.
override
-
addMonthsToMonthDate(
DateTime monthDate, int monthsToAdd) → DateTime -
Returns a DateTime that is
monthDatewith the added number of months and the day set to 1 and time set to midnight.override -
dateHelpText(
MaterialLocalizations localizations) → String -
The help text used on an empty InputDatePickerFormField to indicate
to the user the date format being asked for.
override
-
dateOnly(
DateTime date) → DateTime -
Returns a DateTime with the date of the original, but time set to
midnight.
override
-
datesOnly(
DateTimeRange< DateTime> range) → DateTimeRange<DateTime> -
Returns a DateTimeRange with the dates of the original, but with times
set to midnight.
override
-
firstDayOffset(
int year, int month, MaterialLocalizations localizations) → int -
Computes the offset from the first day of the week that the first day of
the
monthfalls on.override -
formatCompactDate(
DateTime date, MaterialLocalizations localizations) → String -
Formats the date in a compact format.
override
-
formatFullDate(
DateTime date, MaterialLocalizations localizations) → String -
Formats day of week, month, day of month and year in a long-width format.
override
-
formatMediumDate(
DateTime date, MaterialLocalizations localizations) → String -
Formats the date using a medium-width format.
override
-
formatMonthYear(
DateTime date, MaterialLocalizations localizations) → String -
Formats the month and the year of the given
date.override -
formatShortDate(
DateTime date, MaterialLocalizations localizations) → String -
Formats the date using a short-width format.
override
-
formatShortMonthDay(
DateTime date, MaterialLocalizations localizations) → String -
Formats the month and day of the given
date.override -
formatYear(
int year, MaterialLocalizations localizations) → String -
Full unabbreviated year format, e.g. 2017 rather than 17.
inherited
-
getDay(
int year, int month, int day) → HijriDateTime -
Returns a DateTime with the given
year,month, andday.override -
getDaysInMonth(
int year, int month) → int -
Returns the number of days in a month, according to the calendar system.
override
-
getMonth(
int year, int month) → HijriDateTime -
Returns a DateTime with the given
yearandmonth.override -
isSameDay(
DateTime? dateA, DateTime? dateB) → bool -
Returns true if the two DateTime objects have the same day, month, and
year, or are both null.
override
-
isSameMonth(
DateTime? dateA, DateTime? dateB) → bool -
Returns true if the two DateTime objects have the same month and
year, or are both null.
override
-
monthDelta(
DateTime startDate, DateTime endDate) → int -
Determines the number of months between two DateTime objects.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
now(
) → DateTime -
Returns a DateTime representing the current date and time.
override
-
parseCompactDate(
String? inputString, MaterialLocalizations localizations) → DateTime? -
Returns null for invalid input. A non-null result in another calendar
throws ArgumentError, indicating incompatible localization configuration.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited