@@ -181,58 +181,81 @@ class _WeeklySchedulePageState extends State<WeeklySchedulePage>
181181
182182 return PropertyChangeProvider <WeeklyScheduleViewModel , String >(
183183 value: viewModel,
184- child: Stack (
185- fit : StackFit .passthrough ,
186- children : < Widget > [
187- Column (
188- mainAxisAlignment : MainAxisAlignment .spaceEvenly,
189- crossAxisAlignment : CrossAxisAlignment .stretch ,
190- children : < Widget > [
191- _buildNavigationHeader (context),
192- Expanded (
184+ child: RefreshIndicator (
185+ onRefresh : () => viewModel. refreshVisibleWeek () ,
186+ child : LayoutBuilder (
187+ builder : (context, constraints) {
188+ return SingleChildScrollView (
189+ key : const ValueKey < String >( 'weekly_schedule_refresh_scroll_view' ) ,
190+ physics : const AlwaysScrollableScrollPhysics (),
191+ child : SizedBox (
192+ height : constraints.maxHeight,
193193 child: Stack (
194+ fit: StackFit .passthrough,
194195 children: < Widget > [
195- Padding (
196- padding: const EdgeInsets .fromLTRB (8 , 0 , 8 , 8 ),
197- child: PropertyChangeConsumer <WeeklyScheduleViewModel ,
198- String >(
199- properties: const ['weekSchedule' , 'now' ],
200- builder: (
201- BuildContext context,
202- WeeklyScheduleViewModel ? model,
203- Set <String >? properties,
204- ) {
205- if (model == null ) return const SizedBox .shrink ();
206- return _buildAnimatedScheduleViewport (context, model);
207- },
208- ),
209- ),
210- PropertyChangeConsumer <WeeklyScheduleViewModel , String >(
211- properties: const ['isUpdating' , 'weekSchedule' ],
212- builder: (
213- BuildContext context,
214- WeeklyScheduleViewModel ? model,
215- Set <String >? properties,
216- ) {
217- if (model == null ) return const SizedBox .shrink ();
218- return _TopLoadingIndicator (
219- isUpdating: model.isUpdating,
220- showWithoutDelay: model.visibleWeekNeedsInitialFetch,
221- );
222- },
223- ),
224- Positioned (
225- right: 20 ,
226- bottom: 16 ,
227- child: _buildCurrentWeekButton (context),
196+ Column (
197+ mainAxisAlignment: MainAxisAlignment .spaceEvenly,
198+ crossAxisAlignment: CrossAxisAlignment .stretch,
199+ children: < Widget > [
200+ _buildNavigationHeader (context),
201+ Expanded (
202+ child: Stack (
203+ children: < Widget > [
204+ Padding (
205+ padding: const EdgeInsets .fromLTRB (8 , 0 , 8 , 8 ),
206+ child: PropertyChangeConsumer <
207+ WeeklyScheduleViewModel , String >(
208+ properties: const ['weekSchedule' , 'now' ],
209+ builder: (
210+ BuildContext context,
211+ WeeklyScheduleViewModel ? model,
212+ Set <String >? properties,
213+ ) {
214+ if (model == null ) {
215+ return const SizedBox .shrink ();
216+ }
217+ return _buildAnimatedScheduleViewport (
218+ context,
219+ model,
220+ );
221+ },
222+ ),
223+ ),
224+ PropertyChangeConsumer <WeeklyScheduleViewModel ,
225+ String >(
226+ properties: const ['isUpdating' , 'weekSchedule' ],
227+ builder: (
228+ BuildContext context,
229+ WeeklyScheduleViewModel ? model,
230+ Set <String >? properties,
231+ ) {
232+ if (model == null ) {
233+ return const SizedBox .shrink ();
234+ }
235+ return _TopLoadingIndicator (
236+ isUpdating: model.isUpdating,
237+ showWithoutDelay:
238+ model.visibleWeekNeedsInitialFetch,
239+ );
240+ },
241+ ),
242+ Positioned (
243+ right: 20 ,
244+ bottom: 16 ,
245+ child: _buildCurrentWeekButton (context),
246+ ),
247+ ],
248+ ),
249+ ),
250+ ],
228251 ),
252+ buildErrorDisplay (context),
229253 ],
230254 ),
231255 ),
232- ],
233- ),
234- buildErrorDisplay (context)
235- ],
256+ );
257+ },
258+ ),
236259 ),
237260 );
238261 }
0 commit comments