TF-362 Change the view of Home and Session to become loading with spinner in white background

This commit is contained in:
Dat PHAM HOANG
2022-03-18 13:09:51 +07:00
committed by Dat H. Pham
parent be6006510e
commit 6dc9e7b74f
3 changed files with 8 additions and 19 deletions
+7 -14
View File
@@ -1,25 +1,18 @@
import 'package:core/core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:tmail_ui_user/features/home/presentation/home_controller.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
class HomeView extends GetWidget<HomeController> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.primaryColor,
body: SafeArea(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(AppLocalizations.of(context).initializing_data, style: TextStyle(color: Colors.white, fontSize: 17)),
],
),
),
return Container(
color: AppColor.primaryLightColor,
child: SizedBox(
width: 100,
height: 100,
child: CupertinoActivityIndicator(),
),
);
}
@@ -8,7 +8,7 @@ class SessionView extends GetWidget<SessionController> {
@override
Widget build(BuildContext context) {
return Container(
color: AppColor.primaryColor,
color: AppColor.primaryLightColor,
child: SizedBox(
width: 100,
height: 100,
@@ -126,10 +126,6 @@ class ThreadRepositoryImpl extends ThreadRepository {
return EmailsResponse(emailList: response.first, state: response.last);
});
newEmailResponse.emailList?.forEach((element) {
log('ThreadRepositoryImpl::getAllEmail(): filter = ${emailFilter?.mailboxId} [LOCAL] final yield: ${element.subject}:${element.id.id}');
});
yield newEmailResponse;
}