import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class RememberPasswordRow extends StatelessWidget {
  final bool value;
  final ValueChanged<bool?> onChanged;
  final VoidCallback onForgotPassword;

  const RememberPasswordRow({
    super.key,
    required this.value,
    required this.onChanged,
    required this.onForgotPassword,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Container(
          alignment: Alignment.center,
          child: Row(
            mainAxisSize: MainAxisSize.min,
            children: [
              SizedBox(
                width: 40.w,
                height: 40.w,
                child: Transform.scale(
                  scale: 0.8,
                  child: Checkbox(
                    value: value,
                    onChanged: onChanged,
                    activeColor: const Color(0xFF4A90E2),
                    checkColor: Colors.white,
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(25.w),
                    ),
                    side: const BorderSide(color: Color(0xFF4A90E2)),
                    materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                  ),
                ),
              ),
              SizedBox(width: 10.w),
              Text(
                '记住密码',
                style: TextStyle(
                  color: const Color(0xFF0A0D14),
                  fontSize: 24.sp,
                  fontWeight: FontWeight.w600,
                ),
              ),
            ],
          ),
        ),
        // GestureDetector(
        //   onTap: onForgotPassword,
        //   child: Text(
        //     '忘记密码?',
        //     style: TextStyle(
        //       color: Color(0xFF0A0D14),
        //       fontSize: 24.sp,
        //     ),
        //   ),
        // ),
      ],
    );
  }
}
