utils/utils library

Functions

convertBytesToKB(int bytes) double
Converts bytes to kilobytes (KB).
copyToClipboard(String text) Future<bool>
Copies the specified text to the system clipboard.
getConnectionType() Future<String>
Retrieves the current network connection type.
getFormattedTime(DateTime? dateTime) String
Formats a DateTime object into a string of the format HH:mm:ss:SSS.
getSSLDetails(Uri url) Future<SSLDetails?>
Fetches SSL details for a given URL.
isSuccess(int statusCode) bool
Checks if a given HTTP status code represents a successful response.
showSnackbar(BuildContext context, String message, {Duration duration = const Duration(seconds: 3)}) → void
Displays a snackbar with a custom message in the provided context.
toPrettyJson(dynamic input) String
Converts a dynamic input into a formatted JSON string.
toPrettyJsonList(dynamic input) String