@@ -34,7 +34,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
3434 }
3535
3636 Future <void > _initData () async {
37- ref.read (homeViewModelProvider.notifier).loadSurveys ();
37+ ref.read (homeViewModelProvider.notifier).loadSurveys (isRefreshing : false );
3838 }
3939
4040 @override
@@ -68,39 +68,42 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
6868 );
6969 }
7070 return Scaffold (
71+ backgroundColor: Colors .black,
7172 body: RefreshIndicator (
72- color: Colors .white,
73- backgroundColor: Colors .black,
74- onRefresh: () => ref.read (homeViewModelProvider.notifier).loadSurveys (isRefreshing: true ),
75- child: SingleChildScrollView (
76- physics: const AlwaysScrollableScrollPhysics (),
77- child: SizedBox (
78- height: MediaQuery .of (context).size.height,
79- child: Stack (
80- children: [
81- if (surveys.isNotEmpty) ...[
82- HomePagesWidget (
83- surveys: surveys,
84- currentPage: _currentPage,
85- ),
86- const HomeHeaderWidget (),
87- Align (
88- alignment: Alignment .bottomCenter,
89- child: Padding (
90- padding: const EdgeInsets .only (bottom: 220 ),
91- child: HomePageIndicatorWidget (
92- surveysLength: surveys.length,
93- currentPage: _currentPage,
73+ color: Colors .white,
74+ backgroundColor: Colors .black,
75+ onRefresh: () => ref
76+ .read (homeViewModelProvider.notifier)
77+ .loadSurveys (isRefreshing: true ),
78+ child: SingleChildScrollView (
79+ physics: const AlwaysScrollableScrollPhysics (),
80+ child: SizedBox (
81+ height: MediaQuery .of (context).size.height,
82+ child: Stack (
83+ children: [
84+ if (surveys.isNotEmpty) ...[
85+ HomePagesWidget (
86+ surveys: surveys,
87+ currentPage: _currentPage,
88+ ),
89+ const HomeHeaderWidget (),
90+ Align (
91+ alignment: Alignment .bottomCenter,
92+ child: Padding (
93+ padding: const EdgeInsets .only (bottom: 220 ),
94+ child: HomePageIndicatorWidget (
95+ surveysLength: surveys.length,
96+ currentPage: _currentPage,
9497 ),
95- ),
96- )
97- ],
98- if (surveys.isEmpty || isLoading) _buildShimmerLoading (),
99- ],
98+ ),
99+ )
100+ ],
101+ if (surveys.isEmpty || isLoading) _buildShimmerLoading (),
102+ ],
103+ ),
104+ ),
100105 ),
101- ),
102- ),
103- ));
106+ ));
104107 }
105108
106109 Widget _buildShimmerLoading () {
0 commit comments