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.
98 lines
2.6 KiB
98 lines
2.6 KiB
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'; |
|
|
|
class CommentMenu extends StatefulWidget { |
|
final bool isSelf; |
|
|
|
final Function(String type) clickType; |
|
|
|
CommentMenu( |
|
this.clickType, { |
|
this.isSelf = false, |
|
}); |
|
|
|
@override |
|
State<StatefulWidget> createState() { |
|
return _CommentMenu(); |
|
} |
|
} |
|
|
|
class _CommentMenu extends State<CommentMenu> { |
|
@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), |
|
), |
|
), |
|
), |
|
), |
|
], |
|
), |
|
); |
|
} |
|
}
|
|
|