import 'package:flutter/material.dart';

import '../../../../core/styles/app_color.dart';
import '../../../../shared/components/exit_app_dialog.dart';
import 'register_step_layout.dart';

class RegisterStepScreen extends StatelessWidget {
  final String fromScreen;
  const RegisterStepScreen({
    super.key,
    required this.fromScreen,
  });

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: () async {
        if (fromScreen == "welcome" || fromScreen == "login") {
          exitAppDialog(context);
          return false;
        } else {
          return true;
        }
      },
      child: const Scaffold(
        backgroundColor: AppColor.plainWhite,
        resizeToAvoidBottomInset: true,
        body: RegisterStepLayout(),
      ),
    );
  }
}
