FormatUtil class

格式化工具类 提供一些常用的格式化方法

Constructors

FormatUtil()

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

formatDuration(double milliseconds) String
格式化时间
formatDurationByStr(String milliseconds) String
格式化时间字符串
formatViewCount(int viewCount, [String langCode = 'en']) String
格式化播放量 viewCount 播放量 langCode 语言代码,支持 ar, de, en, es, fil, fr, id, it, ja, ko, pl, pt, ru, th, tr, vi, zh_Hans, zh_Hant,默认是 en 返回格式化后的播放量