junny_utils
library
Classes
Bidi
This provides utility methods for working with bidirectional text. All
of the methods are static, and are organized into a class primarily to
group them together for documentation and discoverability.
BidiFormatter
Bidi stands for Bi-directional text. According to
Wikipedia :
Bi-directional text is text containing text in both text directionalities,
both right-to-left (RTL) and left-to-right (LTR). It generally involves text
containing different types of alphabets, but may also refer to
boustrophedon, which is changing text directionality in each row.
BoolList
A space-efficient list of boolean values.
CanonicalizedMap <C , K , V >
A map whose keys are converted to canonical values of type C.
CaseInsensitiveEquality
String equality that's insensitive to differences in ASCII case.
CombinedIterableView <T >
A view of several iterables combined sequentially into a single iterable.
CombinedListView <T >
A view of several lists combined into a single list.
CombinedMapView <K , V >
Returns a new map that represents maps flattened into a single map.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive
manner.
DeepCollectionEquality
Deep equality on collections.
DefaultEquality <E >
Equality of objects that compares only the natural equality of the objects.
DelegatingIterable <E >
An Iterable that delegates all operations to a base iterable.
DelegatingList <E >
A List that delegates all operations to a base list.
DelegatingMap <K , V >
A Map that delegates all operations to a base map.
DelegatingQueue <E >
A Queue that delegates all operations to a base queue.
DelegatingSet <E >
A Set that delegates all operations to a base set.
DeviceUtils
设备相关的工具类,提供获取设备信息的方法
DirectoryUtils
文件夹相关的工具类,提供初始化存储目录等方法
在调用任何目录获取方法之前,必须先调用 init 方法进行初始化。
Equality <E >
A generic equality relation on objects.
EqualityBy <E , F >
Equality of objects based on derived values.
EqualityMap <K , V >
A Map whose key equality is determined by an Equality object.
EqualitySet <E >
A Set whose key equality is determined by an Equality object.
HapticUtil
HapticUtil 是一个震动反馈工具类,提供了不同类型的震动反馈功能,
用于向用户提供成功、警告和失败等通知类型的震动反馈。该类通过震动序列
和平台适配,简化了震动反馈的调用,提升了用户交互体验。
HeapPriorityQueue <E >
Heap based priority queue.
IdentityEquality <E >
Equality of objects that compares only the identity of the objects.
Intl
The Intl class provides a common entry point for internationalization
related tasks. An Intl instance can be created for a particular locale
and used to create a date format via anIntl.date(). Static methods
on this class are also used in message formatting.
IterableEquality <E >
Equality on iterables.
IterableZip <T >
Iterable that iterates over lists of values from other iterables.
JunnyLogUtils
LogUtils 是一个日志工具类,用于记录和处理应用程序的运行日志。
JunnyPermissionUtils
权限工具类,用于处理应用的权限请求、检查、管理等功能。
ListEquality <E >
Equality on lists.
ListSlice <E >
A list view of a range of another list.
LogEvent
LogEvent 表示一次日志记录的事件对象,包含日志时间、标签、消息以及堆栈信息。
MapEquality <K , V >
Equality on maps.
MapKeySet <E >
An unmodifiable Set view of the keys of a Map .
MapValueSet <K , V >
Creates a modifiable Set view of the values of a Map .
MicroMoney
Used primarily for currency formatting, this number-like class stores
millionths of a currency unit, typically as an Int64.
MultiEquality <E >
Combines several equalities into a single equality.
NonGrowableListMixin <E >
Mixin class that implements a throwing version of all list operations that
change the List's length.
NonGrowableListView <E >
A fixed-length list.
NumberFormat
Provides the ability to format a number in a locale-specific way.
NumberParserBase <R >
PackageUtils
用于管理与包相关的信息,如版本、构建号和应用名称。此类还可以用于检查更新
以及处理版本相关的操作。
Permission
Defines the permissions which can be checked and requested.
PermissionWithService
A special kind of permission, used to access a service.
Pick
A picked object holding the value (may be null) and giving access to useful parsing functions
PriorityQueue <E >
A priority queue is a priority based work-list of elements.
QueueList <E >
A class that efficiently implements both Queue and List .
RequiredPick
A picked object holding the value (never null) and giving access to useful parsing functions
SelectedDataProvider <T >
管理已选择数据的类
SetEquality <E >
Equality of sets.
TextDirection
Represents directionality of text.
TextInputFormatterUtils
工具类,提供常用的文本输入格式化方法
UnionSet <E >
A single set that provides a view of the union over a set of sets.
UnionSetController <E >
A controller that exposes a view of the union of a collection of sets.
UnmodifiableListView <E >
An unmodifiable List view of another List.
UnmodifiableMapMixin <K , V >
Mixin class that implements a throwing version of all map operations that
change the Map.
UnmodifiableMapView <K , V >
View of a Map that disallow modifying the map.
UnmodifiableSetMixin <E >
Mixin class that implements a throwing version of all set operations that
change the Set.
UnmodifiableSetView <E >
An unmodifiable set.
UnorderedIterableEquality <E >
Equality of the elements of two iterables without considering order.
Functions
asType <T > (dynamic data , [dynamic key0 , dynamic key1 , dynamic key2 , dynamic key3 , dynamic key4 , dynamic key5 , dynamic key6 , dynamic key7 , dynamic key8 , dynamic key9 ])
→ T
解析基础数据类型
asTypeList <T > (dynamic data , [dynamic key0 , dynamic key1 , dynamic key2 , dynamic key3 , dynamic key4 , dynamic key5 , dynamic key6 , dynamic key7 , dynamic key8 , dynamic key9 ])
→ List <T >
解析列表类型数据
binarySearch <E > (List <E > sortedList , E value , {int compare (E , E )? })
→ int
Returns a position of the value in sortedList, if it is there.
compareAsciiLowerCase (String a , String b )
→ int
Compares a and b lexically, converting ASCII letters to lower case.
compareAsciiLowerCaseNatural (String a , String b )
→ int
Compares strings a and b according to lower-case
natural sort ordering .
compareAsciiUpperCase (String a , String b )
→ int
Compares a and b lexically, converting ASCII letters to upper case.
compareAsciiUpperCaseNatural (String a , String b )
→ int
Compares strings a and b according to upper-case
natural sort ordering .
compareNatural (String a , String b )
→ int
Compares strings a and b according to natural sort ordering .
equalsIgnoreAsciiCase (String a , String b )
→ bool
Checks if strings a and b differ only on the case of ASCII letters.
groupBy <S , T > (Iterable <S > values , T key (S ) )
→ Map <T , List <S > >
Groups the elements in values by the value returned by key.
hashIgnoreAsciiCase (String string )
→ int
Hash code for a string which is compatible with equalsIgnoreAsciiCase .
insertionSort <E > (List <E > elements , {int compare (E , E )?, int start = 0 , int ? end })
→ void
Sort a list between start (inclusive) and end (exclusive) using
insertion sort.
isDynamicEmpty (dynamic data )
→ bool
判断动态类型是否为空。
lastBy <S , T > (Iterable <S > values , T key (S ) )
→ Map <T , S >
Associates the elements in values by the value returned by key.
lowerBound <E > (List <E > sortedList , E value , {int compare (E , E )? })
→ int
Returns the first position in sortedList that does not compare less than
value.
mapMap <K1 , V1 , K2 , V2 > (Map <K1 , V1 > map , {K2 key (K1 , V1 )?, V2 value (K1 , V1 )? })
→ Map <K2 , V2 >
Creates a new map from map with new keys and values.
maxBy <S , T > (Iterable <S > values , T orderBy (S ), {int compare (T , T )? })
→ S?
Returns the element of values for which orderBy returns the maximum
value.
mergeMaps <K , V > (Map <K , V > map1 , Map <K , V > map2 , {V value (V , V )? })
→ Map <K , V >
Returns a new map with all key/value pairs in both map1 and map2.
mergeSort <E > (List <E > elements , {int start = 0 , int ? end , int compare (E , E )? })
→ void
Sorts a list between start (inclusive) and end (exclusive) using the
merge sort algorithm.
minBy <S , T > (Iterable <S > values , T orderBy (S ), {int compare (T , T )? })
→ S?
Returns the element of values for which orderBy returns the minimum
value.
openAppSettings ()
→ Future <bool >
Opens the app settings page.
pick (dynamic json , [Object ? arg0 , Object ? arg1 , Object ? arg2 , Object ? arg3 , Object ? arg4 , Object ? arg5 , Object ? arg6 , Object ? arg7 , Object ? arg8 , Object ? arg9 ])
→ Pick
Picks the value of a json-like dart data structure consisting of Maps,
Lists and objects at location arg0, arg1 ... arg9
pickDeep (dynamic json , List <Object > selector )
→ Pick
Picks the value of json by traversing the object along the values in
selector one by one
pickFromJson (String json , [Object ? arg0 , Object ? arg1 , Object ? arg2 , Object ? arg3 , Object ? arg4 , Object ? arg5 , Object ? arg6 , Object ? arg7 , Object ? arg8 , Object ? arg9 ])
→ Pick
Picks a values from a json String at location arg0, arg1...
reverse <E > (List <E > elements , [int start = 0 , int ? end ])
→ void
Reverses a list, or a part of a list, in-place.
run <ReturnType > (ReturnType operation () )
→ ReturnType
执行指定的操作并返回其结果。
shuffle (List elements , [int start = 0 , int ? end , Random ? random ])
→ void
Shuffles a list randomly.
stronglyConnectedComponents <T > (Map <T , Iterable <T > > graph )
→ List <Set <T > >
Returns the strongly connected components of graph, in topological
order.
toBeginningOfSentenceCase <T extends String ? > (T input , [String ? locale ])
→ T
Convert a string to beginning of sentence case, in a way appropriate to the
locale.
transitiveClosure <T > (Map <T , Iterable <T > > graph )
→ Map <T , Set <T > >
Returns the transitive closure of graph.
typeOf <T > ()
→ Type
获取泛型 T 的实际类型。