import 'package:flutter/material.dart'; /// 举手按钮 class HandRaiseButton extends StatelessWidget { final void Function() onTap; const HandRaiseButton({super.key, required this.onTap}); @override Widget build(BuildContext context) { return InkWell( onTap: onTap, child: Container( height: 60, width: 60, decoration: BoxDecoration( color: Colors.black12, shape: BoxShape.circle, ), child: Icon( Icons.back_hand_rounded, color: Color(0xFFFDC400), size: 24, ), ), ); } } ///topBar的操作按钮 class ActionButton extends StatelessWidget { final IconData icon; final String text; final Color? color; final void Function()? onTap; const ActionButton({ super.key, required this.icon, required this.text, this.color, this.onTap, }); @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.only(right: 15), decoration: BoxDecoration( color: color ?? Color(0xff4a4f4f), borderRadius: BorderRadius.circular(8), ), child: InkWell( onTap: onTap, child: Row( children: [ Icon(icon, size: 16), SizedBox(width: 8), Text(text, style: TextStyle(fontSize: 14)), ], ), ), ); } }