flutter_utils library

Enums

DialogType

Properties

currentDate DateTime
final

Functions

calculateDaysBetweenTwoDates(DateTime startDate, DateTime endDate) int
Calculates the number of days between two DateTime objects.
calculateTimeDelayInMinutes({required DateTime start, required DateTime end}) String
convert24To12(String time) String
convertTimeTo24Hour(String time) List<int>
convertToDateTime(String time) DateTime
getDateByName(DateTime date) → ({String day, String month, String year})
Extracts the year, month, and day from a DateTime object and returns them as a named tuple.
isEmpty(dynamic value) bool
isNotEmpty(dynamic value) bool
logMessage(dynamic message) → void
scrollDirectionHandler({required ValueChanged<bool> function, required ScrollController scrollController}) → void
Handles the scroll direction and triggers a callback function based on the scroll direction.
showFullWidthDialog({required Widget child, required DialogType type, bool isCancelable = true, BuildContext? context, dynamic heightFactor = 0.5, double elevation = 0}) → dynamic
stringToDate(String date, {String format = 'yyyy-MM-dd'}) DateTime
Converts a string representation of a date to a DateTime object.
stringToDateByName(String date, {String format = 'yyyy-MM-dd'}) → ({String day, String month, String year})
Converts a string representation of a date to a named tuple containing the year, month, and day.