|
...
|
...
|
@@ -360,38 +360,38 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { |
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(left: w(10), right: w(10), bottom: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
border: Border.all(width: w(1), color: MyColours.color_F8F7F3)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: w(34),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
child: Text(
|
|
|
|
'常用模版',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(10)),
|
|
|
|
child: Wrap(
|
|
|
|
spacing: w(10),
|
|
|
|
runSpacing: w(5),
|
|
|
|
children: _templateUI(),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(50),
|
|
|
|
// Container(
|
|
|
|
// padding: EdgeInsets.only(left: w(10), right: w(10), bottom: w(10)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
// border: Border.all(width: w(1), color: MyColours.color_F8F7F3)),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// height: w(34),
|
|
|
|
// alignment: Alignment.centerLeft,
|
|
|
|
// child: Text(
|
|
|
|
// '常用模版',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontSize: font(12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(10),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.only(left: w(10)),
|
|
|
|
// child: Wrap(
|
|
|
|
// spacing: w(10),
|
|
|
|
// runSpacing: w(5),
|
|
|
|
// children: _templateUI(),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(50),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
...
|
...
|
@@ -429,7 +429,7 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { |
|
|
|
width: ScreenUtil().setWidth(44)),
|
|
|
|
HEmptyView(15),
|
|
|
|
Text(
|
|
|
|
'在当前位置插入优惠',
|
|
|
|
'营销加入优惠', //'在当前位置插入优惠',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
...
|
...
|
@@ -462,25 +462,28 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { |
|
|
|
customerMakingProvider.youhui = couponList[
|
|
|
|
customerMakingProvider.couponSelectIndex];
|
|
|
|
});
|
|
|
|
var cursorPos = customerMakingProvider
|
|
|
|
.controller.selection.base.offset; //获取到光标的在字符串的位置
|
|
|
|
|
|
|
|
String textAfterCursor = customerMakingProvider
|
|
|
|
.controller.text
|
|
|
|
.substring(cursorPos); //把字符串从光标的位置截取,光标后面的
|
|
|
|
|
|
|
|
String textBeforeCursor = customerMakingProvider
|
|
|
|
.controller.text
|
|
|
|
.substring(0, cursorPos); //光标前面的字符串
|
|
|
|
customerMakingProvider.controller.text =
|
|
|
|
textBeforeCursor +
|
|
|
|
"http://www.baidu.com" +
|
|
|
|
textAfterCursor; //把想要的插入的内容拼接在光标位置处
|
|
|
|
|
|
|
|
customerMakingProvider.controller.selection =
|
|
|
|
TextSelection.collapsed(
|
|
|
|
offset: customerMakingProvider
|
|
|
|
.controller.text.length);
|
|
|
|
|
|
|
|
// *************开始直接插入会报错***********还没有改
|
|
|
|
|
|
|
|
// var cursorPos = customerMakingProvider
|
|
|
|
// .controller.selection.base.offset; //获取到光标的在字符串的位置
|
|
|
|
|
|
|
|
// String textAfterCursor = customerMakingProvider
|
|
|
|
// .controller.text
|
|
|
|
// .substring(cursorPos); //把字符串从光标的位置截取,光标后面的
|
|
|
|
|
|
|
|
// String textBeforeCursor = customerMakingProvider
|
|
|
|
// .controller.text
|
|
|
|
// .substring(0, cursorPos); //光标前面的字符串
|
|
|
|
// customerMakingProvider.controller.text =
|
|
|
|
// textBeforeCursor +
|
|
|
|
// "http://www.baidu.com" +
|
|
|
|
// textAfterCursor; //把想要的插入的内容拼接在光标位置处
|
|
|
|
|
|
|
|
// customerMakingProvider.controller.selection =
|
|
|
|
// TextSelection.collapsed(
|
|
|
|
// offset: customerMakingProvider
|
|
|
|
// .controller.text.length);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selecteds: customerMakingProvider
|
...
|
...
|
|