DMethod class

Utility method

Constructors

DMethod()

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

byteToMb(int byte) double
convert Byte value to MegaByte value
coordinateDistance(dynamic lat1, dynamic lon1, dynamic lat2, dynamic lon2) double
count distance beetween 2 coordinate in km (kilometer)
log(String message, {int? colorCode, String? prefix}) → void
log for debug mode
with color customize
logResponse(Response response, {int? titleCode, int? bodyCode, int? maxBodyChar = 200, String? prefix}) → void
log for debug response http package
with color customize
maxBodyChar : max character to show, default: 200\ set null to show all titleCode color of title bodyCode color of body
logTitle(String title, String body, {int? titleCode, int? bodyCode, int? maxBodyChar = 200, String? prefix}) → void
log for 2 line string with color customize
maxBodyChar : max character to show, default: 200\ set null to show all titleCode color of title bodyCode color of body
numberAutoDigit(double value, [int maxDigit = 3]) String
set digit number if decimal equal to "0" then auto return int number as String
printBasic(String body, [int colorCode = 172]) → void
print in console with custom color colorCode must be 0-255\
printResponse(Response response, {String? prefix, int? lineCount, int? titleCode, int? bodyCode, int? maxBodyChar, bool showAllDataBody = false}) → void
print in console with style for Response http access
code must be 0-255 (for color)
Default:
lineCount = 60
titleCode = 172
bodyCode = 178
maxBodyChar = 200
showAllDataBody: false
printTitle(String title, String body, {int? lineCount, int? titleCode, int? bodyCode, int? maxBodyChar, bool showAllDataBody = false}) → void
print in console with line and color style
code must be 0-255 (for color)
Default:
lineCount = 60
titleCode = 172
bodyCode = 178
maxBodyChar = 200
showAllDataBody: false