You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.5 KiB
121 lines
3.5 KiB
import 'package:dating_touchme_app/generated/assets.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
class LiveRoomActionBar extends StatelessWidget {
|
|
const LiveRoomActionBar({
|
|
super.key,
|
|
required this.messageController,
|
|
required this.onMessageChanged,
|
|
required this.onGiftTap,
|
|
required this.onChargeTap,
|
|
});
|
|
|
|
final TextEditingController messageController;
|
|
final ValueChanged<String> onMessageChanged;
|
|
final VoidCallback onGiftTap;
|
|
final VoidCallback onChargeTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(left: 16.w),
|
|
child: InkWell(
|
|
onTap: onGiftTap,
|
|
child: Container(
|
|
width: 38.w,
|
|
height: 38.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)),
|
|
color: const Color.fromRGBO(0, 0, 0, .3),
|
|
),
|
|
child: Center(
|
|
child: Image.asset(
|
|
Assets.imagesGiftIcon,
|
|
width: 28.w,
|
|
height: 28.w,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 9.w),
|
|
Expanded(
|
|
child: Container(
|
|
height: 38.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)),
|
|
color: const Color.fromRGBO(0, 0, 0, .3),
|
|
),
|
|
child: TextField(
|
|
controller: messageController,
|
|
keyboardType: TextInputType.number,
|
|
style: TextStyle(
|
|
fontSize: ScreenUtil().setWidth(14),
|
|
height: 1,
|
|
color: Colors.white,
|
|
),
|
|
decoration: InputDecoration(
|
|
contentPadding: EdgeInsets.symmetric(
|
|
vertical: 0,
|
|
horizontal: 37.w,
|
|
),
|
|
hintText: "聊点什么吧~",
|
|
hintStyle: TextStyle(
|
|
color: const Color.fromRGBO(144, 144, 144, 1),
|
|
),
|
|
border: InputBorder.none,
|
|
),
|
|
onChanged: onMessageChanged,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 8.w),
|
|
Container(
|
|
width: 38.w,
|
|
height: 38.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)),
|
|
color: const Color.fromRGBO(0, 0, 0, .3),
|
|
),
|
|
child: Center(
|
|
child: Image.asset(
|
|
Assets.imagesArrowR,
|
|
width: 16.w,
|
|
height: 16.w,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 8.w),
|
|
InkWell(
|
|
onTap: onChargeTap,
|
|
child: Container(
|
|
width: 38.w,
|
|
height: 38.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(38.w)),
|
|
gradient: const LinearGradient(
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
colors: [
|
|
Color.fromRGBO(255, 43, 110, 1),
|
|
Color.fromRGBO(255, 52, 26, 1),
|
|
],
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Image.asset(
|
|
Assets.imagesRoseWhite,
|
|
width: 14.w,
|
|
height: 25.w,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|