123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- import 'package:flutter/material.dart';
- import 'package:common_project/common_project.dart';
- import 'package:module_chat/model/chat_room_facial_expression_model.dart';
- import 'package:module_chat/model/chat_room_gift_wall_model.dart';
- import 'package:module_chat/text_page/text_animation.dart';
- import 'package:module_chat/view/chat_room_bottom_item.dart';
- import 'package:module_chat/view/child_view/chat_room_bottom_heart_value_list_page.dart';
- import 'package:module_chat/view/child_view/chat_room_bottom_menu.dart';
- import 'package:module_chat/view/child_view/chat_room_bottom_seat_income_list_page.dart';
- import 'package:module_chat/view/child_view/chat_room_expression_page.dart';
- import 'package:module_chat/view/child_view/chat_room_gift_wall_page.dart';
- import 'package:module_chat/view/child_view/chat_room_hour_page.dart';
- import 'package:module_chat/view/child_view/chat_room_online_user_page.dart';
- import 'package:module_chat/view/child_view/chat_room_send_message.dart';
- import 'package:module_chat/view/child_view/chat_room_top_more.dart';
- import 'package:module_chat/view/child_view/room_person_detail_page.dart';
- import 'package:module_chat/view/child_view/seat_sheet_with_titles_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_roo_pk_invite_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_banner_combo_animation.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_combo_alert.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_cross_pk/chat_room_kf_match_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_cross_pk/chat_room_kf_pk_masking_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_cross_pk/chat_room_kf_start_pk_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_pk_index_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_pk_masking_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_pk_mvp_mask_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_pk_progress.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_record_list_page.dart';
- import 'package:module_chat/view/pk_child_view/chat_room_start_pk_page.dart';
- import 'package:module_im/view/message_list_page.dart';
- import 'child_view/request_queue_page.dart';
- /**
- * des: 房间弹出框工具类
- */
- class RoomDialogUtil {
- //麦序等待页面
- static showRequestQueueWidget(BuildContext context, String roomId, bool isJoinQueue, bool isManager, Function func, Function removeQueue){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: Colors.transparent,
- widget: RequestQueuePage(roomId, isJoinQueue,isManager, func, removeQueue)
- );
- }
- //弹出个人资料页面
- static void showRoomUserInfoDia(BuildContext context, String userId,List<String>? titles, Function(String, BuildContext, String,) func, bool showManager,{Function? managerClick}) async {
- TimiUserInfo model = await PublicApi.getUserInfo(userId: userId);
- if (model.success == true && model.data != null){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: Colors.transparent,
- widget: RoomPersonDetailPage(model.data,titles, func, showManager,managerClick: managerClick,)
- );
- }
- }
- //弹出麦位操作框
- static void showSeatSheetView(BuildContext context,List<String> titles,Function(String) func, String numStr){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.black.withOpacity(0.5),
- backgroundColor: Colors.black.withOpacity(0.5),
- widget: SeatSheetWithTitlesPage(func,titles, numStr)
- );
- }
- //小时榜弹框
- static void showHourPge(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.right,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomHourPage()
- );
- }
- static void showChatRoomBottomMenu(BuildContext context,List<ManageBottomItem> items, Function(ChatRoomMenuType) func){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomBottomMenu(func,items)
- );
- }
- static void showMorePage(BuildContext context, Function(String) func){
- DialogAddWidget(
- context: context,
- gravity: Gravity.top,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomTopMore(func)
- );
- }
- //弹出发送消息的弹框
- static void showSendMessagepag(BuildContext context,TextInputType inputType, Function(String) func, String placeContent){
- showModalBottomSheet(
- barrierColor: Colors.transparent,
- isScrollControlled: true,
- context: context, builder:(BuildContext context){
- return ChatRoomSendMessage(inputType,func, placeContent);
- });
- }
- //弹出表情弹框
- static void showExpressionPage(BuildContext context, Function(int) func, List<List<ExpItem>> list ){
- showModalBottomSheet(
- barrierColor: Colors.transparent,
- isScrollControlled: true,
- context: context, builder:(BuildContext context){
- return ChatRoomExpressionPage(func,list);
- });
- }
- //弹出在线用户
- static void showOnLineUsers(BuildContext context, String userRole,String roomId){
- DialogAddWidget(
- context: context,
- gravity: Gravity.top,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomOnlineUserPage(roomId,userRole)
- );
- }
- //弹出上麦框
- static void showOnMic(BuildContext context, Function(String) func){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- color: Colors.black.withOpacity(0.1),
- width: Sizes.width,
- margin: EdgeInsets.only(bottom: Sizes.bottomSafeHeight),
- child: Column(
- children: [
- Container(
- width: Sizes.width - 40.w,
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(Radius.circular(20.w))
- ),
- child: Column(
- children:
- ["1","2","3","4","5","6","7","8"].map((e) {
- return InkWell(
- child: Column(
- children: [
- Container(
- margin: EdgeInsets.symmetric(vertical: 10.h),
- height: 55.h,
- alignment: Alignment.center,
- child: Text("上${e}号麦",style: TextStyle(fontSize: Sizes.fs_30,color: Colors.blue,fontWeight: FontWeight.w600),),
- ),
- e != "8"?Container(height: 1.h,margin: EdgeInsets.symmetric(vertical: 10.h),color: HexColor.fromHex("#f0f0f0"),):Container()
- ],
- ),
- onTap: (){
- Navigator.pop(context);
- func(e);
- },
- );
- }).toList()
- ),),
- InkWell(
- child: Container(
- margin: EdgeInsets.only(top: 20.h,bottom: 40.h,left: 20.w,right: 20.w),
- height: 88.h,
- alignment: Alignment.center,
- child: Text("取消",style: TextStyle(fontSize: Sizes.fs_30,color: Colors.blue,fontWeight: FontWeight.w600),),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(20.w)),
- color: Colors.white,
- ),
- ),
- onTap: (){
- Navigator.pop(context);
- },
- )
- ],
- ),
- )
- );
- }
- static void showCountDownDialogWidget(BuildContext context, Function(int) function){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- margin: EdgeInsets.only(bottom: Sizes.bottomSafeHeight),
- child: Column(
- children: [
- Container(
- width: Sizes.width - 40.w,
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(Radius.circular(20.w))
- ),
- child: Column(
- children:
- ["30秒","1分钟","2分钟","5分钟"].map((e) {
- return InkWell(
- child: Column(
- children: [
- Container(
- margin: EdgeInsets.symmetric(vertical: 10.h),
- height: 88.h,
- alignment: Alignment.center,
- child: Text("${e}",style: TextStyle(fontSize: Sizes.fs_30,color: Colors.blue),),
- ),
- Container(height: 1.h,color: HexColor.fromHex("#f0f0f0"),)
- ],
- ),
- onTap: (){
- Navigator.pop(context);
- int time = 0;
- if(e == "30秒"){
- time = 30;
- } else if (e == "1分钟"){
- time = 60;
- } else if (e== "2分钟"){
- time = 120;
- } else if (e== "5分钟"){
- time = 300;
- }
- function(time);
- },
- );
- }).toList()
- ),),
- InkWell(
- child: Container(
- margin: EdgeInsets.only(top: 30.h,bottom: Sizes.bottomSafeHeight + 40.h),
- height: 88.h,
- width: Sizes.width - 40.w,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(20.w)),color: Colors.white
- ),
- child: Text("取消",style: TextStyle(fontSize: Sizes.fs_30,color: Colors.blue),),),
- onTap: (){
- Navigator.pop(context);
- },
- )
- ],
- ),
- )
- );
- }
- //确认框
- static void showConfirmDialogWidget(BuildContext context,Function cancleFunc,Function confirmFunc,{String? title, String? subtitle, String? cancle,String? confirm}){
- DialogAddWidget(
- context: context,
- gravity: Gravity.center,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 10.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- width: Sizes.width* 0.8,
- color: Colors.white,
- child: Column(
- children: [
- Container(
- margin: EdgeInsets.only(top: 22.h),
- height: 40.h,
- alignment: Alignment.center,
- child: Text("提示",style: TextStyle(fontWeight: FontWeight.w600),),),
- Container(
- alignment: Alignment.center,
- height: 40.h,
- child: Text("确认申请上麦吗?"),),
- SizedBox(height: 25.h,),
- Container(color: HexColor.fromHex("f0f0f0"),width: Sizes.width* 0.8,height: 1.h,),
- Container(
- height: 80.h,
- padding: EdgeInsets.symmetric(horizontal: 30.w),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- InkWell(
- child: Container(
- width: ((Sizes.width * 0.8)- 61.w)/2,
- alignment: Alignment.center,
- child: Text("我再想想",style: TextStyle(color: Colors.blue),),),
- onTap: (){
- Navigator.pop(context);
- cancleFunc();
- },
- ),
- Container(color: HexColor.fromHex("f0f0f0"),width: 1.w,height: 100.h,),
- InkWell(
- child: Container(
- alignment: Alignment.center,
- width: ((Sizes.width * 0.8)- 61.w)/2,
- child: Text("确认",style: TextStyle(color: Colors.blue),),),
- onTap: (){
- Navigator.pop(context);
- confirmFunc();
- },
- )
- ],),
- )
- ],
- ),
- )
- );
- }
- //设置聊天室锁
- static void showChatRoomLock(BuildContext context, Function(String) func){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent
- ),
- borderRadius: 20.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomLock(func)
- );
- }
- //弹出心动值列表
- static void showHeartValueListPage(BuildContext context, String roomId){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomBottomHeartValueListPage(roomId)
- );
- }
- static void showImWidget(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 10.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- width: Sizes.width,
- height: 500.h,
- color: Colors.white,
- child: Column(
- children: [
- Container(
- margin: EdgeInsets.only(top: 10.h),
- child: Text("消息",style: TextStyle(fontSize: Sizes.fs_36,fontWeight: FontWeight.w600),),),
- Expanded(child: MessageListPage())
- ],
- ),
- )
- );
- }
- //麦位收益
- static void showSeatIncome(BuildContext context, String roomId){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 10.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomBottomSeatIncomeListPage(roomId)
- );
- }
- static void showWebViewPage(BuildContext context, String url){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 10.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- height: Sizes.height,
- child: ChatRoomWebViewPage(url),
- width: Sizes.width,
- )
- );
- }
- //弹出甚至踢出时间, 设置主持人等弹框
- static void showCustomAlert(BuildContext context, List<String> items, Function(String) func) {
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: Column(children: [
- Container(
- margin: EdgeInsets.only(left: 30.w,right: 30.w),
- width: Sizes.width * 0.8,
- child: Column(
- children: items.map((e) {
- int index = items.indexOf(e);
- return Column(
- children: [
- InkWell(
- child: Container(
- color: Colors.white.withOpacity(0.1),
- height: 116.h,
- width: 300.w,
- alignment: Alignment.center,
- child: Text(e,style: TextStyle(fontSize: Sizes.fs_40,color: HexColor.fromHex("#007AFF")),),
- ),
- onTap: (){
- Navigator.pop(context);
- func(e);
- },
- ),
- index != items.length -1?Container(
- height: 1.h,
- color: HexColor.fromHex("#000000").withOpacity(0.4),
- ):Container()
- ],
- );
- }).toList(),
- ),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(20.w)),
- color: Colors.white
- ),
- ),
- Container(
- margin: EdgeInsets.only(top: 40.h,bottom: Sizes.bottomSafeHeight + 30.h,left: 40.w,right: 40.w),
- width: Sizes.width * 0.8,
- height: 116.h,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(20.w)),
- color: Colors.white,
- ),
- alignment: Alignment.center,
- child: Text("取消",style: TextStyle(fontSize: Sizes.fs_40,color: HexColor.fromHex("#007AFF")),),)
- ],),
- width: Sizes.width,
- )
- );
- }
- static void showPkIndexPage(BuildContext context,Function function){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: ChatRoomPkIndexPage(),
- width: Sizes.width,
- )
- );
- }
- static void showInRoomPkPage(BuildContext context,bool pkState){
- DialogAddWidget(
- context: context,
- gravity: Gravity.rightBottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: ChatRoomStartPkPage(pkState),
- width: Sizes.width,
- )
- );
- }
- //弹出pk记录
- static void showPKRecordPage(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.rightBottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: ChatRoomRecordListPage(),
- width: Sizes.width,
- )
- );
- }
- static void showKFRoomStartPage(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.rightBottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: ChatRoomKfStartPkPage(),
- width: Sizes.width,
- )
- );
- }
- //弹出跨房pk匹配页面
- static void showkfPkMathchPage(BuildContext context,bool kfpkState){
- DialogAddWidget(
- context: context,
- gravity: Gravity.rightBottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- child: ChatRoomKfMatchPage(kfpkState),
- width: Sizes.width,
- )
- );
- }
- //pk结束弹框
- static void showPkStopAlert(BuildContext context, String pkTitle,Function confirm){
- DialogAddWidget(
- context: context,
- gravity: Gravity.center,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierDismissible: false,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- width: 560.w,
- height: 320.h,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(20.w)),
- color: Colors.white
- ),
- child: Column(
- children: [
- Container(
- margin: EdgeInsets.only(top: 48.h),
- child: Text("Pk正在进行中,是否关闭房间pk",style: TextStyle(fontSize: Sizes.fs_32,color: HexColor.fromHex("#1D1C1F").withOpacity(0.88)),),
- ),
- Container(
- margin: EdgeInsets.only(top: 16),
- child: Text("本轮PK主题:${pkTitle}",style: TextStyle(fontSize: Sizes.fs_24,color: HexColor.fromHex("#1D1C1F").withOpacity(0.4)),),
- ),
- Container(
- margin: EdgeInsets.only(top: 50.h),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- InkWell(
- child: Container(
- width: 232.w,
- height: 80.h,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(40.h)),
- color: HexColor.fromHex("#1D1C1F").withOpacity(0.04)
- ),
- alignment: Alignment.center,
- child: Text("取消",style: TextStyle(fontSize: Sizes.fs_28,color: HexColor.fromHex("#1D1C1F").withOpacity(0.88)),),
- ),
- onTap: (){
- Navigator.pop(context);
- },
- ),
- InkWell(
- child: Container(
- width: 232.w,
- height: 80.h,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- gradient: LinearGradient(
- colors: [HexColor.fromHex("#7040FF"),HexColor.fromHex("#A080FF")],
- begin: Alignment.centerLeft,
- end: Alignment.centerRight
- ),
- borderRadius: BorderRadius.all(Radius.circular(40.h))
- ),
- child: Text("确定",style: TextStyle(fontSize: Sizes.fs_28,color: Colors.white),),
- ),
- onTap: (){
- Navigator.pop(context);
- confirm();
- },
- )
- ],
- ),
- )
- ],
- ),
- )
- );
- }
- //邀请弹框,
- /*
- title 邀请方的房间名
- agree 同意的方法回调
- */
- static void showInviteAlert(BuildContext context,String title, Function refuse,Function agree ,String targetRoomId){
- DialogAddWidget(
- context: context,
- gravity: Gravity.top,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierDismissible: false,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomPkInvitePage(title, refuse, agree,targetRoomId)
- );
- }
- //弹出pk房蒙版
- static showPKMaskingPage(BuildContext context, BattleRoomIn? battleRoomIn){
- DialogAddWidget(
- context: context,
- gravity: Gravity.top,
- barrierDismissible: false,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomPkMaskingPage(battleRoomIn)
- );
- }
- static showPro(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.top,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomPkProgress(12,12)
- );
- }
- static showKfMasking(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.center,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomKfPkMaskingPage(ChatRoomManager.instance.battleRoomCross)
- );
- }
- //显示连击图标
- static showComboAlert(BuildContext context,int gifNumber){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomComboAlert(gifNumber)
- );
- }
- //显示连击弹幕
- //显示mvp蒙版
- static showMvpMaskPage(BuildContext context, BattelPersonInfo? mvpUser,List<BattelPersonInfo>? leftCampVip,List<BattelPersonInfo>? rightCampVip){
- DialogAddWidget(
- context: context,
- gravity: Gravity.center,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomPkMvpMaskPage(mvpUser,leftCampVip,rightCampVip)
- );
- }
- static showGiftWallPage(BuildContext context,int total,List<GiftWallItem> items, Function sendGifAction){
- DialogAddWidget(
- context: context,
- gravity: Gravity.bottom,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 0.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: ChatRoomGiftWallPage(total,items,sendGifAction)
- );
-
- }
- static showLightExpalinALert(BuildContext context){
- DialogAddWidget(
- context: context,
- gravity: Gravity.center,
- decoration: BoxDecoration(
- color: Colors.transparent,
- ),
- borderRadius: 15.0,
- barrierColor: Colors.transparent,
- backgroundColor: HexColor.fromHex('#000000').withOpacity(0.2),
- widget: Container(
- width: Sizes.width * 0.8,
- height: 300.h,
- color: Colors.white,
- child: Column(
- children: [
- Padding(
- padding: EdgeInsets.only(top: 20.h),
- child: Text("礼物点亮说明",style: TextStyle(fontSize: Sizes.fs_36,fontWeight: FontWeight.w500),),
- ),
- Padding(
- padding: EdgeInsets.only(left: 30.w,top: 10.h),
- child: Row(
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text("1,如何帮他点亮礼物"),
- SizedBox(height: 8.h,),
- Text("赠送Ta还未获得过的礼物即可为Ta点亮")
- ],
- )
- ],
- ),
- ),
- InkWell(
- child: Container(
- height: 70.h,
- margin: EdgeInsets.only(left: 150.w,right: 150.w,top: 30.h),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(35.h)),
- gradient: LinearGradient(
- colors: [HexColor.fromHex("#5D26FF"),HexColor.fromHex("#8359FF")],
- begin: Alignment.centerLeft,
- end: Alignment.centerRight
- )
- ),
- alignment: Alignment.center,
- child: Text("我知道了",style: TextStyle(fontSize: Sizes.fs_32,color: Colors.white),),
- ),
- onTap: (){
- Navigator.pop(context);
- },
- )
- ],
- ),
- )
- );
-
- }
- }
|