TF-1033: append auto scroll to identity_creator_view.dart
This commit is contained in:
@@ -65,6 +65,8 @@ class IdentityCreatorController extends BaseController {
|
|||||||
String? _nameIdentity;
|
String? _nameIdentity;
|
||||||
String? _contentHtmlEditor;
|
String? _contentHtmlEditor;
|
||||||
|
|
||||||
|
final ScrollController scrollController = ScrollController();
|
||||||
|
|
||||||
void updateNameIdentity(BuildContext context, String? value) {
|
void updateNameIdentity(BuildContext context, String? value) {
|
||||||
_nameIdentity = value;
|
_nameIdentity = value;
|
||||||
errorNameIdentity.value = _getErrorInputNameString(context);
|
errorNameIdentity.value = _getErrorInputNameString(context);
|
||||||
@@ -106,6 +108,7 @@ class IdentityCreatorController extends BaseController {
|
|||||||
inputBccIdentityController.dispose();
|
inputBccIdentityController.dispose();
|
||||||
identityCreatorIsActiveWorker.dispose();
|
identityCreatorIsActiveWorker.dispose();
|
||||||
keyboardRichTextController.dispose();
|
keyboardRichTextController.dispose();
|
||||||
|
scrollController.dispose();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Expanded(child: KeyboardRichText(
|
Expanded(child: KeyboardRichText(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
controller: controller.scrollController,
|
||||||
physics: const ClampingScrollPhysics(),
|
physics: const ClampingScrollPhysics(),
|
||||||
reverse: true,
|
reverse: true,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -512,7 +513,10 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
key: const Key('signature_html_editor_mobile'),
|
key: const Key('signature_html_editor_mobile'),
|
||||||
minHeight: 230,
|
minHeight: 230,
|
||||||
onCreated: (htmlEditorController) {
|
onCreated: (htmlEditorController) {
|
||||||
controller.keyboardRichTextController.onCreateHTMLEditor(htmlEditorController);
|
controller.keyboardRichTextController.onCreateHTMLEditor(
|
||||||
|
htmlEditorController,
|
||||||
|
scrollController:controller.scrollController,
|
||||||
|
);
|
||||||
controller.signatureHtmlEditorMobileController = htmlEditorController;
|
controller.signatureHtmlEditorMobileController = htmlEditorController;
|
||||||
},
|
},
|
||||||
initialContent: controller.contentHtmlEditor ?? '',
|
initialContent: controller.contentHtmlEditor ?? '',
|
||||||
|
|||||||
Reference in New Issue
Block a user