import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../controller/signin_controller.dart';
import '../widgets/my_signin_widget.dart';

class SigninPage extends GetView<SigninController> {
  static const String namedRoute = '/signin-page';
  const SigninPage({super.key});

  @override
  Widget build(BuildContext context) {
    var sigCtrl = controller;
    var displayWidth = MediaQuery.of(context).size.width;
    var displayHeight = MediaQuery.of(context).size.height;
    return SafeArea(
      child: Scaffold(
        body: Container(
          height: displayHeight,
          width: displayWidth,
          padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 90.0),
          color: Colors.blue.shade100,
          child: SingleChildScrollView(
            child: MySigninWidget(
              signCtrl: sigCtrl,
              onButtonPressed: () => sigCtrl.register(),
              logInOnTab: () => sigCtrl.goToLoginPage(),
            ),
          ),
        ),
      ),
    );
  }
}
