TF-170 [BUG] Fix selected mailbox is not display when open mailboxView
This commit is contained in:
@@ -40,6 +40,7 @@ class _TreeViewData extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
|
key: PageStorageKey('tree_view'),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
primary: false,
|
primary: false,
|
||||||
itemCount: children.length,
|
itemCount: children.length,
|
||||||
|
|||||||
@@ -22,38 +22,26 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Drawer(
|
return Drawer(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
|
||||||
backgroundColor: AppColor.primaryLightColor,
|
backgroundColor: AppColor.primaryLightColor,
|
||||||
body: GestureDetector(
|
body: SafeArea(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
child: Container(
|
||||||
child: SafeArea(
|
alignment: Alignment.center,
|
||||||
right: false,
|
margin: EdgeInsets.symmetric(vertical: 24),
|
||||||
left: false,
|
child: Column(
|
||||||
child: RefreshIndicator(
|
children: [
|
||||||
color: AppColor.primaryColor,
|
_buildHeaderMailbox(context),
|
||||||
onRefresh: () async => controller.refreshAllMailbox(),
|
// _buildSearchFormWidget(context),
|
||||||
child: SingleChildScrollView(
|
SizedBox(height: 16),
|
||||||
physics: AlwaysScrollableScrollPhysics(),
|
Divider(color: AppColor.dividerColor, height: 1),
|
||||||
child: Padding(
|
_buildLoadingView(),
|
||||||
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
Expanded(child: RefreshIndicator(
|
||||||
child: Container(
|
color: AppColor.primaryColor,
|
||||||
alignment: Alignment.center,
|
onRefresh: () async => controller.refreshAllMailbox(),
|
||||||
child: Column(
|
child: _buildListMailbox(context)))
|
||||||
mainAxisSize: MainAxisSize.max,
|
]
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
_buildHeaderMailbox(context),
|
|
||||||
// _buildSearchFormWidget(context),
|
|
||||||
_buildLoadingView(),
|
|
||||||
_buildListMailbox(context)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)),
|
)
|
||||||
|
),
|
||||||
// bottomNavigationBar: responsiveUtils.isMobile(context) ? _buildStorageWidget(context) : null
|
// bottomNavigationBar: responsiveUtils.isMobile(context) ? _buildStorageWidget(context) : null
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -119,7 +107,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
|
|
||||||
Widget _buildListMailbox(BuildContext context) {
|
Widget _buildListMailbox(BuildContext context) {
|
||||||
return ListView(
|
return ListView(
|
||||||
key: Key('mailbox_list'),
|
key: PageStorageKey('mailbox_list'),
|
||||||
primary: false,
|
primary: false,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
children: [
|
children: [
|
||||||
@@ -154,7 +142,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
Widget _buildDefaultMailbox(BuildContext context, List<PresentationMailbox> defaultMailbox) {
|
Widget _buildDefaultMailbox(BuildContext context, List<PresentationMailbox> defaultMailbox) {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: EdgeInsets.only(top: 16, left: 16, right: 16),
|
padding: EdgeInsets.only(top: 16, left: 16, right: 16),
|
||||||
key: Key('default_mailbox_list'),
|
key: PageStorageKey('default_mailbox_list'),
|
||||||
itemCount: defaultMailbox.length,
|
itemCount: defaultMailbox.length,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
primary: false,
|
primary: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user