selfprivacy.org.app/lib/ui/pages/users/empty.dart

74 lines
2.2 KiB
Dart
Raw Normal View History

2021-01-06 17:35:57 +00:00
part of 'users.dart';
class _NoUsers extends StatelessWidget {
const _NoUsers({required this.text});
2021-01-06 17:35:57 +00:00
final String text;
@override
Widget build(final BuildContext context) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
BrandIcons.users,
size: 50,
color: Theme.of(context).colorScheme.onBackground,
),
const SizedBox(height: 20),
Text(
'users.nobody_here'.tr(),
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: Theme.of(context).colorScheme.onBackground,
),
2021-01-06 17:35:57 +00:00
),
const SizedBox(height: 10),
Text(
text,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleSmall?.copyWith(
color: Theme.of(context).colorScheme.onBackground,
),
2021-01-06 17:35:57 +00:00
),
],
),
);
2021-01-06 17:35:57 +00:00
}
class _CouldNotLoadUsers extends StatelessWidget {
const _CouldNotLoadUsers({required this.text});
final String text;
@override
Widget build(final BuildContext context) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
BrandIcons.users,
size: 50,
color: Theme.of(context).colorScheme.onBackground,
),
const SizedBox(height: 20),
Text(
'users.could_not_fetch_users'.tr(),
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: Theme.of(context).colorScheme.onBackground,
),
),
const SizedBox(height: 10),
Text(
text,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleSmall?.copyWith(
color: Theme.of(context).colorScheme.onBackground,
),
),
],
),
);
}