marco.pms.mobile/lib/view/error_pages/error_500_screen.dart
Vaibhav Surve 99902e743c Flutter application
- Created generated_plugin_registrant.cc and generated_plugin_registrant.h to manage plugin registration.
- Added generated_plugins.cmake for plugin configuration in CMake.
- Implemented CMakeLists.txt for the Windows runner, defining build settings and dependencies.
- Created Runner.rc for application resources including versioning and icons.
- Developed flutter_window.cpp and flutter_window.h to manage the Flutter window lifecycle.
- Implemented main.cpp as the entry point for the Windows application.
- Added resource.h for resource definitions.
- Included app icon in resources.
- Created runner.exe.manifest for application settings.
- Developed utils.cpp and utils.h for console management and command line argument handling.
- Implemented win32_window.cpp and win32_window.h for high DPI-aware window management.
2025-04-17 12:30:38 +05:30

75 lines
2.8 KiB
Dart

import 'package:marco/controller/error_pages/error_500_controller.dart';
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
import 'package:marco/helpers/widgets/my_container.dart';
import 'package:marco/helpers/widgets/my_spacing.dart';
import 'package:marco/helpers/widgets/my_text.dart';
import 'package:marco/images.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class Error500Screen extends StatefulWidget {
const Error500Screen({super.key});
@override
State<Error500Screen> createState() => _Error500ScreenState();
}
class _Error500ScreenState extends State<Error500Screen> with SingleTickerProviderStateMixin, UIMixin {
late Error500Controller controller;
@override
void initState() {
controller = Error500Controller();
super.initState();
}
@override
Widget build(BuildContext context) {
return GetBuilder(
init: controller,
tag: 'error_500_controller',
builder: (controller) {
return Scaffold(
body: Stack(
alignment: Alignment.center,
clipBehavior: Clip.antiAliasWithSaveLayer,
children: [
Stack(
clipBehavior: Clip.antiAliasWithSaveLayer,
fit: StackFit.expand,
children: [Image.asset(Images.authBackground, fit: BoxFit.cover), Container(color: Colors.black.withValues(alpha:.6))],
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MyText.displayMedium("500", fontWeight: 600, fontSize: 200, color: contentTheme.onPrimary, textAlign: TextAlign.center),
MyText.displayMedium("Internal server error!", fontWeight: 600, color: contentTheme.onPrimary, textAlign: TextAlign.center),
MySpacing.height(40),
MyText.headlineMedium("The Server has been deserted for a while. Please be patient or try again",
fontWeight: 600, color: contentTheme.onPrimary, textAlign: TextAlign.center),
MySpacing.height(40),
MyContainer(
onTap: () => controller.goToDashboardScreen(),
borderRadiusAll: 8,
color: contentTheme.primary,
height: 44,
width: 200,
paddingAll: 0,
clipBehavior: Clip.antiAliasWithSaveLayer,
child: Center(
child: MyText.bodyLarge(
"Come back later",
color: contentTheme.onPrimary,
)),
)
],
),
],
),
);
},
);
}
}