utils/utils library

Properties

months ↔ List<String>
Months
getter/setter pair
weekDays ↔ List<String>
Weekdays
getter/setter pair

Functions

computeNumbersList(int hashCode) → List<int>
convert a number digits to list of individual digits
computeTimePartitionText(int millisecondsSinceEpoch) → String
Compute Time partition of messages based on created at time stamp
createColorFromHashCode(int hashCode) → ColorPair
Color equivalence of integer
getConsecutives({required List<Message> items, required Message check, int? amount}) → List<ConsecutiveOccurrence>
Collecting consecutive images if upto minimum number of images to group
getDurationTillNow(DateTime pastTime) → Duration
Duration uptil now time format
getFileUrlFromMessage(Message message) → String?
Use this function if you need to dynamically get the url of file-based message.
getGroupedImageMessages(List<Message> messages, List<ConsecutiveOccurrence> consecutiveOccurrences, int startIndex) → List<ImageMessage>
Internal use only
getMonthName(int month) → dynamic
Get month by int
getSentAt(int millisecondsSinceEpoch) → String
Last seen at time format
getWeekDayName(int weekday) → dynamic
Get day by int
groupNumbersIntoRGB(List<int> numbers) → List<int>
Convert a list of numbers to RGB group of 3 set of numbers in a list
indexIsInConsecutives(List<ConsecutiveOccurrence> items, int index) → bool
For internal use only
indexIsInConsecutivesAndIsFirstTake(List<ConsecutiveOccurrence> items, int index) → bool
Internal use only
isSameDay(int? previousMessageTime, int currentMessageTime) → bool
Check if it's same day
logError(String message) → void
Error message printer
updateMessageUri(Message message, String uri) → Message
Use this util to update the uri of a file based message when needed