radars search bug fixed

This commit is contained in:
MohammadTaha Basiri 2022-01-30 17:03:16 +03:30
parent 6da1f5f9f3
commit b12a294f4e
3 changed files with 6 additions and 4 deletions

View File

@ -66,8 +66,7 @@ class _RadarState extends State<Radar> {
builder: (context, state, child) => Stack(
children: [
CustomScrollView(
physics: _isAnimating ||
(state.appState == AppState.busy && state.radars.isEmpty)
physics: _isAnimating
? const NeverScrollableScrollPhysics()
: const ScrollPhysics(),
controller: _scrollController,
@ -159,7 +158,8 @@ class _RadarState extends State<Radar> {
),
if (state.appState != AppState.failed) CategoriesRow1(),
if (state.appState != AppState.failed) CategoriesRow2(),
if (state.appState != AppState.failed) CategoriesList(),
if (state.appState != AppState.failed && !state.searching)
CategoriesList(),
],
),
);
@ -281,6 +281,7 @@ class _RadarState extends State<Radar> {
@override
void dispose() {
_focusNode.dispose();
_scrollController.dispose();
super.dispose();
}

View File

@ -48,6 +48,7 @@ class RadarDetailsState extends CoreProvier {
if (result['nextRadar'].isNotEmpty) {
nextRadar = RadarDetailsData.fromJson(result['nextRadar']);
}
if (isForward == null) {
radars.addAll(List.generate(max(radar.order - 2, 0), (index) => null));
if (prevRadar != null) {
@ -72,6 +73,7 @@ class RadarDetailsState extends CoreProvier {
appState = AppState.idle;
return;
}
if (isForward == null) {
appState = AppState.failed;
}

View File

@ -125,7 +125,6 @@ class _SearchFieldState extends State<SearchField> {
@override
void dispose() {
widget.focusNode.dispose();
super.dispose();
}
}