GiftManager class
直播间礼物管理(赠送礼物和预下载礼物动画等)
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
-
getAnimCacheDir(
) → Future< String?> - 获取动画缓存文件夹(安卓/iOS)
-
getGiftList(
) → List< LiveGiftModel> -
getGiftModelLocalPath(
String cacheDir, LiveGiftModel gift) → String -
getGuardGiftList(
) → List< LiveGiftModel> -
getImGiftLocalPath(
String cacheDir, ImGift gift) → String -
getPresetGiftCountModelList(
) → Future< List< PresetGiftCountModel> > -
isAnimCached(
{required String anim, String? dir}) → Future< bool> -
动画是否已缓存
anim动画相对地址dir动画存储地址,不传默认使用getAnimCacheDir的地址 -
isGiftListEmpty(
) → bool -
isSameUserSendGift(
ImGift preGift, ImGift nextGift) → bool -
是否为相同用户发送的礼物
preGift上一个的礼物nextGift下一个的礼物 -
isSameUserSendSameGift(
ImGift preGift, ImGift nextGift) → bool -
是否相同用户发送的相同礼物
preGift上一个的礼物nextGift下一个的礼物 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preload(
) → dynamic - 预加载 提前
-
preloadAnim(
{required String anim, String? dir}) → Future< String> -
缓存动画
anim动画相对地址dir动画存储地址,不传默认使用getAnimCacheDir的地址 缓存结束返回本地文件地址 -
requestBackpackList(
{required dynamic callback(List< LiveGiftModel> ?), required int location}) → dynamic -
请求背包物品列表
location2 - 直播间背包列表 3 - 聊天室 -
requestGiftList(
{required String liveId, required dynamic callback(List< LiveGiftModel> ?)}) → dynamic - 请求礼物列表
-
requestGuardGiftList(
{required String liveId, required dynamic callback(List< LiveGiftModel> ?)}) → dynamic - 请求守护礼物列表
-
sendGift(
BuildContext? context, {required int giftId, required int giftNum, required String liveId, required bool isSerial, int? serialNum, required dynamic callBack(bool), bool isBackpackGift = false}) → dynamic -
发送礼物
giftId礼物IDgiftNum礼物数量liveId直播间IDisSerial是否连击serialNum连击序号callBack请求回调方法 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- getInstance → GiftManager
-
no setter