Commit 430c0db07977a929069736ca53a3531ee44fb04a

Authored by wdn127929
1 parent a70773f8

光标处插入内容

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 50; 6 + objectVersion = 46;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
549 CODE_SIGN_IDENTITY = "Apple Development"; 549 CODE_SIGN_IDENTITY = "Apple Development";
550 CODE_SIGN_STYLE = Automatic; 550 CODE_SIGN_STYLE = Automatic;
551 - CURRENT_PROJECT_VERSION = 5234; 551 + CURRENT_PROJECT_VERSION = 5235;
552 DEVELOPMENT_TEAM = 8J59HM8B82; 552 DEVELOPMENT_TEAM = 8J59HM8B82;
553 ENABLE_BITCODE = NO; 553 ENABLE_BITCODE = NO;
554 FLUTTER_BUILD_MODE = release; 554 FLUTTER_BUILD_MODE = release;
@@ -696,7 +696,7 @@ @@ -696,7 +696,7 @@
696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
697 CODE_SIGN_IDENTITY = "Apple Development"; 697 CODE_SIGN_IDENTITY = "Apple Development";
698 CODE_SIGN_STYLE = Automatic; 698 CODE_SIGN_STYLE = Automatic;
699 - CURRENT_PROJECT_VERSION = 5234; 699 + CURRENT_PROJECT_VERSION = 5235;
700 DEVELOPMENT_TEAM = 8J59HM8B82; 700 DEVELOPMENT_TEAM = 8J59HM8B82;
701 ENABLE_BITCODE = NO; 701 ENABLE_BITCODE = NO;
702 FLUTTER_BUILD_MODE = debug; 702 FLUTTER_BUILD_MODE = debug;
@@ -732,7 +732,7 @@ @@ -732,7 +732,7 @@
732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
733 CODE_SIGN_IDENTITY = "Apple Development"; 733 CODE_SIGN_IDENTITY = "Apple Development";
734 CODE_SIGN_STYLE = Automatic; 734 CODE_SIGN_STYLE = Automatic;
735 - CURRENT_PROJECT_VERSION = 5234; 735 + CURRENT_PROJECT_VERSION = 5235;
736 DEVELOPMENT_TEAM = 8J59HM8B82; 736 DEVELOPMENT_TEAM = 8J59HM8B82;
737 ENABLE_BITCODE = NO; 737 ENABLE_BITCODE = NO;
738 FLUTTER_BUILD_MODE = release; 738 FLUTTER_BUILD_MODE = release;
@@ -258,7 +258,8 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { @@ -258,7 +258,8 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
258 print(controller.text); 258 print(controller.text);
259 259
260 // 获取当前光标位置 260 // 获取当前光标位置
261 - int cursorPosition = _cursorPosition; 261 + // int cursorPosition = _cursorPosition;
  262 + int cursorPosition = controller.selection.baseOffset;
262 263
263 // 插入文本 264 // 插入文本
264 controller.text = controller.text.substring(0, cursorPosition) + 265 controller.text = controller.text.substring(0, cursorPosition) +
@@ -406,9 +407,9 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { @@ -406,9 +407,9 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
406 // affinity: TextAffinity.downstream, 407 // affinity: TextAffinity.downstream,
407 // offset: controller.text.length, 408 // offset: controller.text.length,
408 // ))); 409 // )));
409 - setState(() {  
410 - _cursorPosition = controller.selection.baseOffset;  
411 - }); 410 + // setState(() {
  411 + // _cursorPosition = controller.selection.baseOffset;
  412 + // });
412 }, 413 },
413 onEditingComplete: () { 414 onEditingComplete: () {
414 FocusScope.of(context) 415 FocusScope.of(context)