marco.pms.mobileapp/lib/view/auth/reset_password_screen.dart
Vaibhav Surve a5dd5e19fc Add Windows runner implementation for Flutter application
- Created CMakeLists.txt for Flutter and runner components.
- Implemented resource script (Runner.rc) for application metadata.
- Developed main entry point (main.cpp) for the Windows application.
- Added FlutterWindow class to manage the Flutter view within a Win32 window.
- Implemented utility functions for console management and command line argument parsing.
- Established Win32Window class for high DPI-aware window handling.
- Included application icon and manifest for proper Windows integration.
- Set up build configurations and dependencies for the Flutter application on Windows.
2025-04-23 09:55:31 +05:30

98 lines
4.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_lucide/flutter_lucide.dart';
import 'package:get/get.dart';
import 'package:marco/controller/auth/reset_password_controller.dart';
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
import 'package:marco/helpers/widgets/my_button.dart';
import 'package:marco/helpers/widgets/my_spacing.dart';
import 'package:marco/helpers/widgets/my_text.dart';
import 'package:marco/helpers/widgets/my_text_style.dart';
import 'package:marco/view/layouts/auth_layout.dart';
class ResetPasswordScreen extends StatefulWidget {
const ResetPasswordScreen({super.key});
@override
State<ResetPasswordScreen> createState() => _ResetPasswordScreenState();
}
class _ResetPasswordScreenState extends State<ResetPasswordScreen> with UIMixin {
ResetPasswordController controller = Get.put(ResetPasswordController());
@override
Widget build(BuildContext context) {
return AuthLayout(
child: GetBuilder(
init: controller,
tag: 'reset_password_controller',
builder: (controller) {
return Form(
key: controller.basicValidator.formKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyText.titleLarge("Reset Password", fontWeight: 600),
MySpacing.height(20),
TextFormField(
validator: controller.basicValidator.getValidation('password'),
controller: controller.basicValidator.getController('password'),
keyboardType: TextInputType.visiblePassword,
style: MyTextStyle.labelMedium(),
decoration: InputDecoration(
labelText: "Password",
labelStyle: MyTextStyle.bodySmall(xMuted: true),
border: OutlineInputBorder(borderSide: BorderSide.none),
suffixIcon: InkWell(
onTap: () => controller.onChangeShowPassword(),
child: Icon(controller.showPassword ? LucideIcons.eye_off : LucideIcons.eye, size: 16),
),
prefixIcon: Icon(LucideIcons.lock, size: 16),
contentPadding: MySpacing.all(16),
isCollapsed: true,
isDense: true,
fillColor: contentTheme.secondary.withAlpha(36),
filled: true,
floatingLabelBehavior: FloatingLabelBehavior.never),
obscureText: controller.showPassword),
MySpacing.height(20),
TextFormField(
validator: controller.basicValidator.getValidation('confirm_password'),
controller: controller.basicValidator.getController('confirm_password'),
keyboardType: TextInputType.visiblePassword,
style: MyTextStyle.labelMedium(),
decoration: InputDecoration(
labelText: "Confirm Password",
labelStyle: MyTextStyle.bodySmall(xMuted: true),
border: OutlineInputBorder(borderSide: BorderSide.none),
suffixIcon: InkWell(
onTap: () => controller.onConfirmPassword(),
child: Icon(controller.confirmPassword ? LucideIcons.eye_off : LucideIcons.eye, size: 16),
),
prefixIcon: Icon(LucideIcons.lock, size: 16),
contentPadding: MySpacing.all(16),
isCollapsed: true,
isDense: true,
filled: true,
fillColor: contentTheme.secondary.withAlpha(36),
floatingLabelBehavior: FloatingLabelBehavior.never),
obscureText: controller.confirmPassword,
),
MySpacing.height(20),
Center(
child: MyButton.rounded(
onPressed: controller.onResetPassword,
elevation: 0,
padding: MySpacing.xy(20, 16),
backgroundColor: contentTheme.primary,
child: MyText.labelMedium('Reset Password', color: contentTheme.onPrimary),
),
),
],
),
);
},
),
);
}
}