|
...
|
...
|
@@ -55,87 +55,108 @@ typedef ClickCallback = void Function(String value); |
|
|
|
// };
|
|
|
|
|
|
|
|
class DialogUtil {
|
|
|
|
|
|
|
|
//回复评论弹框
|
|
|
|
static openCommentsModalBottomSheet(context,
|
|
|
|
static openCommentsModalBottomSheet(context, TextEditingController controller,
|
|
|
|
{VoidCallback lCallback, VoidCallback rCallback}) async {
|
|
|
|
final option = await showModalBottomSheet(
|
|
|
|
context: context,
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
isDismissible: false,
|
|
|
|
isDismissible: true,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
// height: ScreenUtil().setWidth(180 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_DBDBDB,
|
|
|
|
return Scaffold(
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
body: Column(mainAxisSize: MainAxisSize.min, children: [
|
|
|
|
Container(
|
|
|
|
// height: ScreenUtil().setWidth(180 * 2),
|
|
|
|
// constraints: BoxConstraints(minHeight: w(40), maxHeight: w(500)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_F7F7F7,
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
// topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
// topRight: Radius.circular(ScreenUtil().setWidth(24)))
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
onTap: lCallback,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(58 * 2),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
'拍摄',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_EEEEEE,
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: rCallback,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(58 * 2),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
'从相册选择',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setWidth(10),
|
|
|
|
color: MyColours.color_EEEEEE,
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context, '取消');
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(58 * 2),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
'取消',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(15), vertical: w(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(r(8))),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(4)),
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: null,
|
|
|
|
autofocus: true,
|
|
|
|
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
// inputFormatters: lenghtLimit
|
|
|
|
// ? [
|
|
|
|
// LengthLimitingTextInputFormatter(10),
|
|
|
|
// ]
|
|
|
|
// : [],
|
|
|
|
textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
hintText: '评论',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
enabledBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
focusedBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
// name = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text))),
|
|
|
|
HEmptyView(20),
|
|
|
|
RoundButton(
|
|
|
|
text: '发送',
|
|
|
|
width: w(54),
|
|
|
|
height: w(24),
|
|
|
|
gradientStart: controller.text.trim().length > 0
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
gradientEnd: controller.text.trim().length > 0
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
textColor: controller.text.trim().length > 0
|
|
|
|
? MyColours.color_F8F9FD
|
|
|
|
: MyColours.color_000000,
|
|
|
|
fontSize: 24,
|
|
|
|
borderColor: controller.text.trim().length > 0
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
radius: r(15),
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) {
|
|
|
|
List<Widget> temp = [];
|
|
|
|
for (int i = 0; i < menuSunModel.practice.length; i++) {
|
...
|
...
|
|