Hotfix center identity creator loading
This commit is contained in:
@@ -42,15 +42,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget bodyCreatorView = NotificationListener<ScrollNotification>(
|
Widget bodyCreatorView = SingleChildScrollView(
|
||||||
onNotification: (scrollInfo) {
|
|
||||||
if (scrollInfo is ScrollEndNotification &&
|
|
||||||
scrollInfo.metrics.pixels == scrollInfo.metrics.maxScrollExtent) {
|
|
||||||
controller.clearFocusEditor(context);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
controller: controller.scrollController,
|
controller: controller.scrollController,
|
||||||
physics: const ClampingScrollPhysics(),
|
physics: const ClampingScrollPhysics(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -122,6 +114,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
|||||||
LayoutBuilder(
|
LayoutBuilder(
|
||||||
builder: (context, constraintsEditor) {
|
builder: (context, constraintsEditor) {
|
||||||
return Stack(
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -152,6 +145,11 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}),
|
||||||
|
Obx(() {
|
||||||
|
bool isInserting = controller.publicAssetController?.isUploading.isTrue == true
|
||||||
|
|| controller.isCompressingInlineImage.isTrue;
|
||||||
|
return InsertImageLoadingIndicator(isInserting: isInserting);
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -162,10 +160,20 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
|||||||
_buildActionButtonMobile(context)
|
_buildActionButtonMobile(context)
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (PlatformInfo.isWeb) {
|
if (PlatformInfo.isWeb) {
|
||||||
|
bodyCreatorView = NotificationListener<ScrollNotification>(
|
||||||
|
onNotification: (scrollInfo) {
|
||||||
|
if (scrollInfo is ScrollEndNotification &&
|
||||||
|
scrollInfo.metrics.pixels == scrollInfo.metrics.maxScrollExtent) {
|
||||||
|
controller.clearFocusEditor(context);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
child: bodyCreatorView,
|
||||||
|
);
|
||||||
|
|
||||||
return PointerInterceptor(
|
return PointerInterceptor(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => controller.clearFocusEditor(context),
|
onTap: () => controller.clearFocusEditor(context),
|
||||||
@@ -464,34 +472,16 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
|
|||||||
),
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Stack(
|
|
||||||
children: [
|
|
||||||
_buildHtmlEditorWeb(
|
_buildHtmlEditorWeb(
|
||||||
context,
|
context,
|
||||||
controller.contentHtmlEditor,
|
controller.contentHtmlEditor,
|
||||||
maxWidth),
|
maxWidth),
|
||||||
Obx(() {
|
|
||||||
bool isInserting = controller.publicAssetController?.isUploading.isTrue == true
|
|
||||||
|| controller.isCompressingInlineImage.isTrue;
|
|
||||||
return InsertImageLoadingIndicator(isInserting: isInserting);
|
|
||||||
})
|
|
||||||
]
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Stack(
|
return _buildHtmlEditor(
|
||||||
children: [
|
|
||||||
_buildHtmlEditor(
|
|
||||||
context,
|
context,
|
||||||
initialContent: controller.contentHtmlEditor),
|
initialContent: controller.contentHtmlEditor);
|
||||||
Obx(() {
|
|
||||||
bool isInserting = controller.publicAssetController?.isUploading.isTrue == true
|
|
||||||
|| controller.isCompressingInlineImage.isTrue;
|
|
||||||
return InsertImageLoadingIndicator(isInserting: isInserting);
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ class InsertImageLoadingIndicator extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (isInserting) {
|
if (isInserting) {
|
||||||
return const Align(
|
return const Align(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.center,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: AppColor.primaryColor
|
color: AppColor.primaryColor
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user