WtHelper class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
confirm (BuildContext context , {required String title , required String message , String confirmText = 'Confirm' , String cancelText = 'Cancel' })
→ Future <bool >
currency (double amount , {String symbol = '\$' , int decimals = 2 })
→ String
flash (BuildContext context , String message , {bool isError = false })
→ void
formatDate (DateTime date , {String format = 'yyyy-MM-dd' })
→ String
formatDateTime (DateTime date )
→ String
formatNumber (num number )
→ String
hideLoading (BuildContext context )
→ void
showLoading (BuildContext context )
→ void
slug (String text )
→ String
timeAgo (DateTime date , {DateTime ? now , bool assumeUtc = false , int justNowSeconds = 10 , TimeAgoLabels ? labels })
→ String
A relative "time ago" phrase covering seconds → years.
timeAgoFrom (String ? dateTime , {DateTime ? now , bool assumeUtc = false , int justNowSeconds = 10 , TimeAgoLabels ? labels })
→ String
timeAgo for a datetime string (ISO-8601 or yyyy-MM-dd HH:mm:ss).
Returns '' for null / blank / unparseable input instead of throwing —
safe to drop straight into a widget from an API/DB field.
truncate (String text , int maxLength , {String suffix = '...' })
→ String
ucFirst (String text )
→ String