build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final lang = L10n.of(context);
return Scaffold(
body: Container(
margin: const EdgeInsets.only(top: kToolbarHeight),
child: Center(
child: Column(
children: [
Container(
margin: const EdgeInsets.symmetric(vertical: 15),
height: 100,
width: 100,
child: SvgPicture.asset(
'assets/images/undraw_access_denied_re_awnf.svg',
),
),
Container(
margin: const EdgeInsets.symmetric(vertical: 15),
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
text: lang.access,
style: Theme.of(context).textTheme.headlineLarge,
children: <TextSpan>[
TextSpan(
text: ' ${lang.denied}',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.error,
fontSize: 32,
),
),
],
),
),
),
Container(
margin: const EdgeInsets.symmetric(vertical: 15),
child: Text(lang.yourSessionHasBeenTerminatedByServer),
),
softLogout
? OutlinedButton(
onPressed: () => context.goNamed(Routes.intro.name),
child: Text(lang.loginAgain),
)
: OutlinedButton(
onPressed: () => logoutConfirmationDialog(context, ref),
child: Text(lang.clearDBAndReLogin),
),
],
),
),
),
);
}