DateTimes class
DateTimes class provide date and time picker functionality
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
datePicker(
{required BuildContext context, required dynamic onSelected(String date), String? date, String? minDate, String? maxDate, String format = DateTimes.fyyyyMMdd}) → dynamic - pick date with customization
-
dateTimeToString(
{required DateTime date, String format = DateTimes.fyyyyMMdd}) → String - convert date (DateTime to String)
-
getCurrentDateTime(
{String format = DateTimes.fyyyyMMdd}) → String - get current date with format
-
getCurrentTime(
{String format = DateTimes.fHHmmss}) → String - get current time with format
-
getDateByPeriod(
{required String date, int days = 0}) → String - date by period like add days or substract days
-
periodTime(
{required String time, String format = DateTimes.fhhmmpp}) → String - get time with format
-
reverseDate(
{required String date, String dateFormat = DateTimes.fyyyyMMdd}) → String - convert reverse date
-
setValidDate(
{required String fromDate, required String toDate}) → String - set valid date from valid date range
-
stringToDateTime(
{required String date, String format = DateTimes.fyyyyMMdd}) → DateTime - convert date (String to DateTime)
-
stringToTime(
{required String? time}) → TimeOfDay - convert time (String to TimeOfDay)
-
timePicker(
{required BuildContext context, required dynamic onSelected(String time), String? time, String? minTime, String? maxTime, String format = DateTimes.fyyyyMMdd}) → dynamic - pick time with customization
-
timeToString(
{required TimeOfDay time, String format = DateTimes.fHHmmss}) → String - convert time (TimeOfDay to String)
-
validDateRange(
{required String fromDate, required String toDate}) → bool - check valid date range or not