214 lines
9.5 KiB
Dart
214 lines
9.5 KiB
Dart
import 'dart:ui' as ui;
|
|
|
|
import 'package:aslan/chatvibe_ui/theme/chatvibe_theme.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
import 'package:aslan/app_localizations.dart';
|
|
import 'package:aslan/chatvibe_ui/components/at_debounce_widget.dart';
|
|
import 'package:aslan/chatvibe_ui/components/at_compontent.dart';
|
|
import 'package:aslan/chatvibe_managers/rtc_manager.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:aslan/chatvibe_ui/components/text/at_text.dart';
|
|
|
|
class JoinRoomMemberPage extends StatefulWidget {
|
|
String roomId;
|
|
Function() joinMember;
|
|
Function() enterRoom;
|
|
Function() close;
|
|
|
|
JoinRoomMemberPage(this.roomId, this.joinMember, this.close, this.enterRoom);
|
|
|
|
@override
|
|
_JoinRoomMemberPageState createState() => _JoinRoomMemberPageState();
|
|
}
|
|
|
|
class _JoinRoomMemberPageState extends State<JoinRoomMemberPage> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Consumer<RtcProvider>(
|
|
builder: (context, ref, child) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.transparent,
|
|
body: Container(
|
|
margin: EdgeInsets.symmetric(horizontal: 25.w),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(12.w)),
|
|
// 可选:添加背景色来覆盖直角阴影
|
|
color: Colors.transparent, // 或者设置一个透明背景
|
|
),
|
|
child: Column(
|
|
children: <Widget>[
|
|
Spacer(),
|
|
ClipRRect(
|
|
// 添加这层 ClipRRect
|
|
borderRadius: BorderRadius.all(Radius.circular(12.w)),
|
|
child: Stack(
|
|
children: [
|
|
Container(
|
|
padding: EdgeInsets.all(25.w),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.all(Radius.circular(12.w)),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
SizedBox(height: 10.w),
|
|
netImage(
|
|
url:
|
|
ref
|
|
.currenRoom
|
|
?.roomProfile
|
|
?.roomProfile
|
|
?.roomCover ??
|
|
"",
|
|
borderRadius: BorderRadius.all(
|
|
Radius.circular(6.w),
|
|
),
|
|
width: 68.w,
|
|
),
|
|
SizedBox(height: 5.w),
|
|
text(
|
|
"${ref.currenRoom?.roomProfile?.roomProfile?.roomName}",
|
|
fontSize: 16.sp,
|
|
textColor: Colors.black,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
SizedBox(height: 3.w),
|
|
text(
|
|
"ID:${ref.currenRoom?.roomProfile?.roomProfile?.roomAccount}",
|
|
fontSize: 14.sp,
|
|
textColor: Colors.black54,
|
|
),
|
|
SizedBox(height: 10.w),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: ATDebounceWidget(
|
|
debounceTime: Duration(milliseconds: 800),
|
|
child: Container(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 10.w,
|
|
horizontal: 10.w,
|
|
),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(99),
|
|
color: Colors.transparent,
|
|
border: Border.all(
|
|
color: Color(0xffFFBC01),
|
|
width: 1.w,
|
|
),
|
|
),
|
|
alignment: Alignment.center,
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
text(
|
|
"Join(",
|
|
fontWeight: FontWeight.w600,
|
|
textColor:
|
|
ChatVibeTheme.primaryLight,
|
|
fontSize: 16.sp,
|
|
),
|
|
Image.asset(
|
|
"atu_images/general/at_icon_jb.png",
|
|
width: 20.w,
|
|
height: 20.w,
|
|
),
|
|
text(
|
|
"${ref.currenRoom?.roomProfile?.roomSetting?.joinGolds})",
|
|
fontWeight: FontWeight.w600,
|
|
textColor: Color(0xffFFBC01),
|
|
fontSize: 16.sp,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
onTap: () {
|
|
widget.joinMember();
|
|
SmartDialog.dismiss(
|
|
tag: "showJoinRoomMember",
|
|
);
|
|
},
|
|
),
|
|
),
|
|
SizedBox(width: 15.w),
|
|
Expanded(
|
|
child: ATDebounceWidget(
|
|
debounceTime: Duration(milliseconds: 800),
|
|
child: Container(
|
|
alignment: Alignment.center,
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 10.w,
|
|
horizontal: 10.w,
|
|
),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(99),
|
|
gradient: LinearGradient(
|
|
begin: Alignment.centerLeft,
|
|
end: Alignment.centerRight,
|
|
colors: [
|
|
Color(0xffFEB219),
|
|
Color(0xffFF9326),
|
|
],
|
|
),
|
|
),
|
|
child: text(
|
|
ATAppLocalizations.of(context)!.enter,
|
|
fontWeight: FontWeight.w600,
|
|
textColor: Colors.white,
|
|
fontSize: 16.sp,
|
|
),
|
|
),
|
|
onTap: () {
|
|
SmartDialog.dismiss(
|
|
tag: "showJoinRoomMember",
|
|
);
|
|
widget.enterRoom();
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
PositionedDirectional(
|
|
start: 10.w,
|
|
top: 10.w,
|
|
child: GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
child: Container(
|
|
padding: EdgeInsets.all(3.w),
|
|
child: Image.asset(
|
|
"atu_images/general/at_icon_clear_c.png",
|
|
width: 20.w,
|
|
height: 20.w,
|
|
),
|
|
),
|
|
onTap: () {
|
|
widget.close();
|
|
SmartDialog.dismiss(tag: "showJoinRoomMember");
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Spacer(),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|