Added no items to reorder message

This commit is contained in:
Juan Gilsanz Polo 2024-02-07 19:55:44 +01:00
parent 5ca3c04c89
commit 11dd6b23bd
4 changed files with 25 additions and 9 deletions

View file

@ -122,7 +122,26 @@ class _ReorderableTopItemsHomeState extends State<ReorderableTopItemsHome> {
),
),
),
reorderable_list.ReorderableList(
if (homeTopItemsList.isEmpty) Padding(
padding: const EdgeInsets.all(16),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Center(
child: Text(
AppLocalizations.of(context)!.noElementsReorderMessage,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
),
],
),
),
if (homeTopItemsList.isNotEmpty) reorderable_list.ReorderableList(
onReorder: _reorderCallback,
onReorderDone: _reorderDone,
child: ListView.builder(