🐛 Fix un-centered text
This commit is contained in:
parent
e88dea8858
commit
f2d913ffec
@ -14,36 +14,37 @@ class UnauthorizedHint extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: const BoxConstraints(maxWidth: 280),
|
constraints: const BoxConstraints(maxWidth: 280),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Icon(Symbols.login, size: 36),
|
const Icon(Symbols.login, size: 36),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Text(
|
Text(
|
||||||
'unauthorized',
|
'unauthorized',
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
).tr(),
|
textAlign: TextAlign.center,
|
||||||
const Gap(8),
|
).tr(),
|
||||||
Text(
|
const Gap(8),
|
||||||
'unauthorizedDescription',
|
Text(
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
'unauthorizedDescription',
|
||||||
).tr(),
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
],
|
textAlign: TextAlign.center,
|
||||||
|
).tr(),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
onTap: () {
|
||||||
onTap: () {
|
GoRouter.of(context).pushNamed('authLogin').then((value) {
|
||||||
GoRouter.of(context).pushNamed('authLogin').then((value) {
|
if (value == true && context.mounted) {
|
||||||
if (value == true && context.mounted) {
|
final ua = context.read<UserProvider>();
|
||||||
final ua = context.read<UserProvider>();
|
context.showSnackbar('loginSuccess'.tr(args: [
|
||||||
context.showSnackbar('loginSuccess'.tr(args: [
|
'@${ua.user?.name} (${ua.user?.nick})',
|
||||||
'@${ua.user?.name} (${ua.user?.nick})',
|
]));
|
||||||
]));
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user