import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/separator.dart'; class CommentMenu extends StatefulWidget { final bool isSelf; final Function(String type) clickType; CommentMenu( this.clickType, { this.isSelf = false, }); @override State createState() { return _CommentMenu(); } } class _CommentMenu extends State { @override Widget build(BuildContext context) { return Container( height: widget.isSelf ? 224.h : 164.h, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.vertical(top: Radius.circular(8)), ), child: Column( mainAxisSize: MainAxisSize.max, children: [ InkWell( onTap: () { Navigator.of(context).pop(); widget.clickType("huifu"); }, child: Container( padding: EdgeInsets.all(20.h), child: Text( S.of(context).huifu, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 16.sp, color: Color(0xFF353535), ), ), ), ), Container( height: 1.h, color: Color(0xFFF7F7F7), ), if (widget.isSelf) InkWell( onTap: () { Navigator.of(context).pop(); widget.clickType("shanchu"); }, child: Container( padding: EdgeInsets.all(20.h), child: Text( S.of(context).shanchu, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 16.sp, color: Color(0xFF353535), ), ), ), ), if (widget.isSelf) Container( height: 1.h, color: Color(0xFFF7F7F7), ), InkWell( onTap: () { Navigator.of(context).pop(); }, child: Container( padding: EdgeInsets.all(20.h), child: Text( S.of(context).quxiao, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 16.sp, color: Color(0xFF727272), ), ), ), ), ], ), ); } }