fix: Show search bar during loading of selector views

This commit is contained in:
Alberto Ponces 2022-09-12 00:36:18 +01:00
parent 6665095b2e
commit d01e7fdcc2
2 changed files with 53 additions and 53 deletions

View file

@ -35,13 +35,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 4.0, horizontal: 12.0),
child: model.noApps
? Center(
child: I18nText('appSelectorCard.noAppsLabel'),
)
: model.apps.isEmpty
? const AppSkeletonLoader()
: Column(
child: Column(
children: <Widget>[
SearchBar(
showSelectIcon: false,
@ -57,7 +51,13 @@ class _AppSelectorViewState extends State<AppSelectorView> {
),
const SizedBox(height: 12),
Expanded(
child: ListView(
child: model.noApps
? Center(
child: I18nText('appSelectorCard.noAppsLabel'),
)
: model.apps.isEmpty
? const AppSkeletonLoader()
: ListView(
padding: const EdgeInsets.only(bottom: 80),
children: model
.getFilteredApps(_query)

View file

@ -37,13 +37,7 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 4.0, horizontal: 12.0),
child: model.patches.isEmpty
? Center(
child: CircularProgressIndicator(
color: Theme.of(context).colorScheme.primary,
),
)
: Column(
child: Column(
children: <Widget>[
SearchBar(
showSelectIcon: true,
@ -60,7 +54,13 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
),
const SizedBox(height: 12),
Expanded(
child: ListView(
child: model.patches.isEmpty
? Center(
child: CircularProgressIndicator(
color: Theme.of(context).colorScheme.primary,
),
)
: ListView(
padding: const EdgeInsets.only(bottom: 80),
children: model
.getQueriedPatches(_query)