marco.pms.mobileapp/lib/view/layouts/auth_layout.dart
Vaibhav Surve 5c53a3f4be Refactor project structure and rename from 'marco' to 'on field work'
- Updated import paths across multiple files to reflect the new package name.
- Changed application name and identifiers in CMakeLists.txt, Runner.rc, and other configuration files.
- Modified web index.html and manifest.json to update the app title and name.
- Adjusted macOS and Windows project settings to align with the new application name.
- Ensured consistency in naming across all relevant files and directories.
2025-11-22 14:20:37 +05:30

74 lines
2.3 KiB
Dart

import 'package:on_field_work/controller/layout/auth_layout_controller.dart';
import 'package:on_field_work/helpers/widgets/my_container.dart';
import 'package:on_field_work/helpers/widgets/my_flex.dart';
import 'package:on_field_work/helpers/widgets/my_flex_item.dart';
import 'package:on_field_work/helpers/widgets/my_responsive.dart';
import 'package:on_field_work/helpers/widgets/my_spacing.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:on_field_work/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(),
),
),
],
));
}
}