Files
kmobile/lib/features/security/security_error_screen.dart

55 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:lottie/lottie.dart';
class SecurityErrorScreen extends StatelessWidget {
final String message;
const SecurityErrorScreen({Key? key, required this.message})
: super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Lottie.asset('assets/animations/error.json', height: 200),
const SizedBox(height: 20),
Text(
message,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 18, fontWeight: FontWeight.w600),
),
const SizedBox(height: 40),
ElevatedButton(
onPressed: () => SystemChannels.platform
.invokeMethod('SystemNavigator.pop'),
child: const Text('Okay'),
),
],
),
),
IgnorePointer(
child: Center(
child: Opacity(
opacity: 0.1, // Low opacity
child: Image.asset(
'assets/images/logo.png',
width: 200, // Adjust size as needed
height: 200, // Adjust size as needed
),
),
),
),
],
),
);
}
}