Adds loading indicator when waiting for IGC options (#1302)

* Adds loading indicator when waiting for IGC options

* when editting source text, don't show loading indicator

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
pull/1544/head
Kelrap 11 months ago committed by GitHub
parent 9c8edaada8
commit eed93f2601
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -393,9 +393,15 @@ class ITChoices extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
try { try {
if (controller.isEditingSourceText || controller.currentITStep == null) { if (controller.isEditingSourceText) {
return const SizedBox(); return const SizedBox();
} }
if (controller.currentITStep == null) {
return CircularProgressIndicator(
strokeWidth: 2.0,
color: Theme.of(context).colorScheme.primary,
);
}
return ChoicesArray( return ChoicesArray(
isLoading: controller.isLoading || isLoading: controller.isLoading ||
controller.choreographer.isFetching || controller.choreographer.isFetching ||

Loading…
Cancel
Save