Added Localizations and ran small fixes
This commit is contained in:
@@ -21,8 +21,8 @@ class ResourceContainer<T extends GenericProvider> extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) => Consumer<T>(builder: (context, provider, _) {
|
||||
if (provider.isLoading) return loading ?? Center(child: CircularProgressIndicator());
|
||||
if (provider.error != null) return error ?? Text('Error while loading data. Try again'); //TODO: need to implement localizations and add more details to the error
|
||||
if (provider.isEmpty) return empty ?? Text('Empty data'); //TODO: need to implement localizations too
|
||||
if (provider.error != null) return error ?? Text('Error while loading data. Try again');
|
||||
if (provider.isEmpty) return empty ?? Text('Empty data');
|
||||
return builder(context, provider);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user