- 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.
98 lines
4.5 KiB
Dart
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),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|