@@ -112,47 +112,53 @@ class _NotificationPageState extends State<NotificationPage> with SingleTickerPr
112112 NotificationStatus .success => TabBarView (
113113 controller: _tabController,
114114 children: [
115- EasyRefresh (
115+ EasyRefresh . builder (
116116 controller: _noticeRefreshController,
117117 header: const MaterialHeader (),
118118 onRefresh: () => context.read <NotificationBloc >().add (NotificationUpdateAllRequested ()),
119- child:
120- n.isEmpty
121- ? _buildEmptyBody (context)
122- : ListView .separated (
123- padding: edgeInsetsL12T4R12B4,
124- itemCount: n.length,
125- itemBuilder: (_, idx) => NoticeCardV2 (n.elementAt (idx)),
126- separatorBuilder: (_, __) => sizedBoxW4H4,
127- ),
119+ childBuilder:
120+ (context, physics) =>
121+ n.isEmpty
122+ ? _buildEmptyBody (context)
123+ : ListView .separated (
124+ physics: physics,
125+ padding: edgeInsetsL12T4R12B4,
126+ itemCount: n.length,
127+ itemBuilder: (_, idx) => NoticeCardV2 (n.elementAt (idx)),
128+ separatorBuilder: (_, __) => sizedBoxW4H4,
129+ ),
128130 ),
129- EasyRefresh (
131+ EasyRefresh . builder (
130132 controller: _personalMessageRefreshController,
131133 header: const MaterialHeader (),
132134 onRefresh: () => context.read <NotificationBloc >().add (NotificationUpdateAllRequested ()),
133- child:
134- pm.isEmpty
135- ? _buildEmptyBody (context)
136- : ListView .separated (
137- padding: edgeInsetsL12T4R12B4,
138- itemCount: pm.length,
139- itemBuilder: (_, idx) => PersonalMessageCardV2 (pm.elementAt (idx)),
140- separatorBuilder: (_, __) => sizedBoxW4H4,
141- ),
135+ childBuilder:
136+ (context, physics) =>
137+ pm.isEmpty
138+ ? _buildEmptyBody (context)
139+ : ListView .separated (
140+ physics: physics,
141+ padding: edgeInsetsL12T4R12B4,
142+ itemCount: pm.length,
143+ itemBuilder: (_, idx) => PersonalMessageCardV2 (pm.elementAt (idx)),
144+ separatorBuilder: (_, __) => sizedBoxW4H4,
145+ ),
142146 ),
143- EasyRefresh (
147+ EasyRefresh . builder (
144148 controller: _broadcastMessageRefreshController,
145149 header: const MaterialHeader (),
146150 onRefresh: () => context.read <NotificationBloc >().add (NotificationUpdateAllRequested ()),
147- child:
148- bm.isEmpty
149- ? _buildEmptyBody (context)
150- : ListView .separated (
151- padding: edgeInsetsL12T4R12B4,
152- itemCount: bm.length,
153- itemBuilder: (_, idx) => BroadcastMessageCardV2 (bm.elementAt (idx)),
154- separatorBuilder: (_, __) => sizedBoxW4H4,
155- ),
151+ childBuilder:
152+ (context, physics) =>
153+ bm.isEmpty
154+ ? _buildEmptyBody (context)
155+ : ListView .separated (
156+ physics: physics,
157+ padding: edgeInsetsL12T4R12B4,
158+ itemCount: bm.length,
159+ itemBuilder: (_, idx) => BroadcastMessageCardV2 (bm.elementAt (idx)),
160+ separatorBuilder: (_, __) => sizedBoxW4H4,
161+ ),
156162 ),
157163 ],
158164 ),
0 commit comments