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.
 
 
 
 
 

131 lines
3.9 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.onSendTap,
required this.onGiftTap,
required this.onChargeTap,
});
final TextEditingController messageController;
final ValueChanged<String> onMessageChanged;
final VoidCallback onSendTap;
final VoidCallback onGiftTap;
final VoidCallback onChargeTap;
@override
Widget build(BuildContext context) {
return Row(
children: [
SizedBox(width: 16.w),
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: Center(
child: TextField(
controller: messageController,
keyboardType: TextInputType.text,
textAlignVertical: TextAlignVertical.center,
style: TextStyle(
fontSize: ScreenUtil().setWidth(14),
height: 1.2,
color: Colors.white,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 0,
horizontal: 15.w,
),
hintText: "聊点什么吧~",
hintStyle: TextStyle(
color: const Color.fromRGBO(144, 144, 144, 1),
height: 1.2,
),
border: InputBorder.none,
isDense: true,
),
onChanged: onMessageChanged,
onSubmitted: (_) => onSendTap(),
),
),
),
),
SizedBox(width: 8.w),
// InkWell(
// onTap: onSendTap,
// 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.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,
),
),
),
),
SizedBox(width: 16.w),
],
);
}
}