Showing
1 changed file
with
20 additions
and
0 deletions
| @@ -399,6 +399,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | @@ -399,6 +399,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | ||
| 399 | customerMakingProvider.youhui = couponList[ | 399 | customerMakingProvider.youhui = couponList[ |
| 400 | customerMakingProvider.couponSelectIndex]; | 400 | customerMakingProvider.couponSelectIndex]; |
| 401 | }); | 401 | }); |
| 402 | + | ||
| 403 | + // var cursorPos = customerMakingProvider | ||
| 404 | + // .controller.selection.base.offset; //获取到光标的在字符串的位置 | ||
| 405 | + | ||
| 406 | + // String textAfterCursor = customerMakingProvider | ||
| 407 | + // .controller.text | ||
| 408 | + // .substring(cursorPos); //把字符串从光标的位置截取,光标后面的 | ||
| 409 | + | ||
| 410 | + // String textBeforeCursor = customerMakingProvider | ||
| 411 | + // .controller.text | ||
| 412 | + // .substring(0, cursorPos); //光标前面的字符串 | ||
| 413 | + // customerMakingProvider.controller.text = | ||
| 414 | + // textBeforeCursor + | ||
| 415 | + // "http://www.baidu.com" + | ||
| 416 | + // textAfterCursor; //把想要的插入的内容拼接在光标位置处 | ||
| 417 | + | ||
| 418 | + // customerMakingProvider.controller.selection = | ||
| 419 | + // TextSelection.collapsed( | ||
| 420 | + // offset: customerMakingProvider | ||
| 421 | + // .controller.text.length); | ||
| 402 | } | 422 | } |
| 403 | }, | 423 | }, |
| 404 | selecteds: customerMakingProvider | 424 | selecteds: customerMakingProvider |
-
Please register or login to post a comment