marco.pms.mobile/lib/view/layouts/auth_layout.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

74 lines
2.3 KiB
Dart

import 'package:marco/controller/layout/auth_layout_controller.dart';
import 'package:marco/helpers/widgets/my_container.dart';
import 'package:marco/helpers/widgets/my_flex.dart';
import 'package:marco/helpers/widgets/my_flex_item.dart';
import 'package:marco/helpers/widgets/my_responsive.dart';
import 'package:marco/helpers/widgets/my_spacing.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:marco/images.dart';
class AuthLayout extends StatelessWidget {
final Widget? child;
final AuthLayoutController controller = AuthLayoutController();
AuthLayout({super.key, this.child});
@override
Widget build(BuildContext context) {
return MyResponsive(builder: (BuildContext context, _, screenMT) {
return GetBuilder(
init: controller,
builder: (controller) {
return screenMT.isMobile ? mobileScreen(context) : largeScreen(context);
});
});
}
Widget mobileScreen(BuildContext context) {
return Scaffold(
key: controller.scaffoldKey,
body: Center(
child: SingleChildScrollView(
padding: MySpacing.x(24),
key: controller.scrollKey,
child: child,
),
),
);
}
Widget largeScreen(BuildContext context) {
return Scaffold(
key: controller.scaffoldKey,
body: MyFlex(
spacing: 0,
runSpacing: 0,
runAlignment: WrapAlignment.center,
wrapCrossAlignment: WrapCrossAlignment.center,
wrapAlignment: WrapAlignment.center,
children: [
MyFlexItem(
sizes: 'xxl-9 xl-8 lg-8 md-6 sm-0',
child: Image.asset(
Images.authBackground,
fit: BoxFit.cover,
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
)),
MyFlexItem(
sizes: "xxl-3 xl-4 lg-4 md-6 sm-12",
child: MyContainer(
height: MediaQuery.of(context).size.height,
paddingAll: 24,
borderRadiusAll: 0,
clipBehavior: Clip.antiAliasWithSaveLayer,
child: child ?? Container(),
),
),
],
));
}
}