@@ -77,7 +77,8 @@ class _MainPage extends HookConsumerWidget {
77
77
return Scaffold (
78
78
backgroundColor: ColorStyles .pageBackground (),
79
79
body: ViewStateWrapper <List <Snippet >>(
80
- isLoading: state == ModelState .loading || stateNotification.isLoading == true ,
80
+ isLoading:
81
+ state == ModelState .loading || stateNotification.isLoading == true ,
81
82
error: stateNotification.error,
82
83
data: stateNotification.data? .cast (),
83
84
builder: (_, snippets) {
@@ -114,14 +115,15 @@ class _MainPage extends HookConsumerWidget {
114
115
typedef ExpandChangeListener = Function (bool );
115
116
116
117
class _MainPageData extends HookWidget {
117
- const _MainPageData (
118
- {required this .navigator,
119
- required this .model,
120
- required this .snippets,
121
- required this .filter,
122
- required this .controller,
123
- required this .expanded,
124
- required this .onExpandChange});
118
+ const _MainPageData ({
119
+ required this .navigator,
120
+ required this .model,
121
+ required this .snippets,
122
+ required this .filter,
123
+ required this .controller,
124
+ required this .expanded,
125
+ required this .onExpandChange,
126
+ });
125
127
126
128
final DetailsNavigator navigator;
127
129
final ChannelMainModel model;
@@ -165,65 +167,71 @@ class _MainPageData extends HookWidget {
165
167
],
166
168
),
167
169
SliverAppBar (
168
- floating: true ,
169
- forceElevated: true ,
170
- expandedHeight: Dimens .extendedAppBarHeight,
171
- elevation: Dimens .s / 2 ,
172
- backgroundColor: ColorStyles .surfacePrimary (),
173
- shape: const RoundedRectangleBorder (
174
- borderRadius: BorderRadius .only (
175
- bottomLeft: Radius .circular (Dimens .l),
176
- bottomRight: Radius .circular (Dimens .l),
177
- ),
170
+ floating: true ,
171
+ forceElevated: true ,
172
+ expandedHeight: Dimens .extendedAppBarHeight,
173
+ elevation: Dimens .s / 2 ,
174
+ backgroundColor: ColorStyles .surfacePrimary (),
175
+ shape: const RoundedRectangleBorder (
176
+ borderRadius: BorderRadius .only (
177
+ bottomLeft: Radius .circular (Dimens .l),
178
+ bottomRight: Radius .circular (Dimens .l),
178
179
),
179
- flexibleSpace : FlexibleSpaceBar (
180
- collapseMode : CollapseMode .parallax,
181
- background : Padding (
182
- padding : const EdgeInsets . symmetric (horizontal : Dimens .m),
183
- child : Column (
184
- mainAxisAlignment : MainAxisAlignment .end,
185
- children : [
186
- PaddingStyles . small (
187
- Row (children : [ TextStyles . bold ( "Scope" )]),
188
- ),
189
- PaddingStyles . small (
190
- Row (
191
- children : [
192
- Expanded (
193
- child : SizedBox (
194
- height : Dimens .filterDropdownHeight,
195
- child : FilterDropdown (
196
- filters : filter.scopes ?? List . empty (),
197
- selected : filter.selectedScope ?? '' ,
198
- onSelected : (scope) {
199
- model. filterScope (scope);
200
- },
201
- ) ,
180
+ ),
181
+ flexibleSpace : FlexibleSpaceBar (
182
+ collapseMode : CollapseMode .parallax,
183
+ background : Padding (
184
+ padding : const EdgeInsets . symmetric (horizontal : Dimens .m),
185
+ child : Column (
186
+ mainAxisAlignment : MainAxisAlignment .end,
187
+ children : [
188
+ PaddingStyles . small (
189
+ Row (children : [ TextStyles . bold ( "Scope" )] ),
190
+ ),
191
+ PaddingStyles . small (
192
+ Row (
193
+ children : [
194
+ Expanded (
195
+ child : SizedBox (
196
+ height : Dimens .filterDropdownHeight,
197
+ child : FilterDropdown (
198
+ filters : filter.scopes ?? List . empty () ,
199
+ selected : filter.selectedScope ?? '' ,
200
+ onSelected : (scope) {
201
+ model. filterScope (scope);
202
+ } ,
202
203
),
203
204
),
204
- ],
205
- ),
205
+ ),
206
+ const SizedBox (width: Dimens .xl),
207
+ const Icon (
208
+ Icons .favorite_border,
209
+ color: Colors .black,
210
+ ),
211
+ ],
206
212
),
207
- PaddingStyles . small (
208
- Row (children : [ TextStyles . bold ( "Language" )]),
209
- ),
210
- SizedBox (
211
- height : Dimens .filterListHeight,
212
- child : FilterListView (
213
- filters : filter.languages ?? List . empty (),
214
- selected : filter.selectedLanguages ?? List .empty (),
215
- onSelected : (language, isSelected) {
216
- model. filterLanguage (language, isSelected);
217
- },
218
- ) ,
213
+ ),
214
+ PaddingStyles . small (
215
+ Row (children : [ TextStyles . bold ( "Language" )] ),
216
+ ),
217
+ SizedBox (
218
+ height : Dimens .filterListHeight,
219
+ child : FilterListView (
220
+ filters : filter.languages ?? List .empty (),
221
+ selected : filter.selectedLanguages ?? List . empty (),
222
+ onSelected : (language, isSelected) {
223
+ model. filterLanguage (language, isSelected);
224
+ } ,
219
225
),
220
- const SizedBox (
221
- height : Dimens .m,
222
- )
223
- ],
224
- ) ,
226
+ ),
227
+ const SizedBox (
228
+ height : Dimens .m,
229
+ )
230
+ ] ,
225
231
),
226
- ))
232
+ ),
233
+ ),
234
+ )
227
235
];
228
236
},
229
237
body: CustomScrollView (
0 commit comments