easix library

Classes

SortedDateList<T>
Sorted notifications.
SortedDateModel<T>
Sorted notifications.

Enums

DateLang
DateLang enum for toHumanDate extension it has two values en and ar en is for English language ar is for Arabic language
DateMode
DateMode enum for toHumanDate extension it has two values full and short full is for full date format like: 'MMM d, y' - September 19, 2023 short is for short date format like: 'MMM d' - September 19

Extensions

BuildContextExtensions on BuildContext
EmptyPadding on num
This method is used to add extension on num to add a sized box with height and width.
StringInitials on String
TimeOfDayExtension on TimeOfDay
TimeOfDayExtensions on TimeOfDay
an extension to check time of the day
ToHumanDate on DateTime
ToTime on String
convert time from 12:55:00 to 12:55 PM or 12:55 AM based on the time using extension on date time
Validate on String?
Validate class contains all the validation methods that are used in the application This class is used to validate the user input and return the error error if the input is invalid otherwise it returns null
YMDExtension on DateTime
custom time display extension on DateTime

Functions

convertToSortedDateList<T>(SortedDateList<T> existingList, List<T> newList, String getDate(T)) SortedDateList<T>
Convert to sorted notifications.
getTypeList<T>(dynamic data, T fromJson(Map<String, dynamic>)) List<T>
get type list from dynamic data an example of how to use it:

Exceptions / Errors

Failure
Failure class to handle errors
LocalError
Failure class to handle local errors
ServerError
Failure class to handle server errors