2022-10-04 13:12:54 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022 Yubico.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2021-11-19 17:05:57 +03:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-07 14:59:44 +03:00
|
|
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
2021-11-19 17:05:57 +03:00
|
|
|
|
|
|
|
class ErrorPage extends StatelessWidget {
|
|
|
|
final String error;
|
2022-05-12 10:56:55 +03:00
|
|
|
const ErrorPage({required this.error, super.key});
|
2021-11-19 17:05:57 +03:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
2023-03-02 14:45:55 +03:00
|
|
|
title: Text(AppLocalizations.of(context)!.s_application_error),
|
2021-11-19 17:05:57 +03:00
|
|
|
),
|
|
|
|
body: Center(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
error,
|
2023-01-26 13:52:01 +03:00
|
|
|
style: Theme.of(context).textTheme.headlineMedium,
|
2021-11-19 17:05:57 +03:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|