Untitled

 avatar
unknown
dart
6 months ago
7.9 kB
4
Indexable
@override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppColors.mainBlue,
      extendBodyBehindAppBar: true,
      body: SafeArea(
        child: SingleChildScrollView(
          child: Column(
            children: [
              Container(
                color: AppColors.bgWhite,
                width: double.infinity,
                child: Column(
                  children: [
                    Padding(
                      padding: const EdgeInsets.only(top: 100, bottom: 40),
                      child: Image.asset(
                        AppAssets.guLogo,
                        width: 240,
                      ),
                    ),
                    // ini containernya
                    Container(
                      width: double.infinity,
                      height: 30,
                      decoration: const BoxDecoration(
                        color: AppColors.mainBlue,
                        borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(22),
                          topRight: Radius.circular(22),
                        ),
                      ),
                    )
                  ],
                ),
              ),
              Padding(
                padding: const EdgeInsets.only(
                  left: AppConstants.pagePadding,
                  right: AppConstants.pagePadding,
                ),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    const Text(
                      "Selamat Datang\ndi eLearning GreatEdu",
                      style: TextStyle(
                        fontSize: 20,
                        color: Colors.white,
                        fontWeight: FontWeight.w400,
                      ),
                    ),
                    DView.height(14),
                    const Text(
                      "Buat akun dan dapatkan semua materi sekolah yang kamu butuhkan",
                      style: TextStyle(
                        fontSize: 14,
                        color: Colors.white,
                      ),
                    ),
                    DView.height(30),
                    Form(
                      key: formKey,
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              const Text(
                                "NISN",
                                style: TextStyle(
                                  fontSize: 16,
                                  color: Colors.white,
                                ),
                              ),
                              DView.height(3),
                              DInput(
                                controller: etNisn,
                                fillColor: AppColors.bgWhite,
                                hint: 'NISN',
                                radius: BorderRadius.circular(8),
                                validator: (input) =>
                                    input == '' ? "Wajib diisi" : null,
                              ),
                            ],
                          ),
                          DView.height(14),
                          Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              const Text(
                                "Password",
                                style: TextStyle(
                                  fontSize: 16,
                                  color: Colors.white,
                                ),
                              ),
                              DView.height(3),
                              DInputPassword(
                                controller: etPassword,
                                fillColor: AppColors.bgWhite,
                                hint: 'Password',
                                radius: BorderRadius.circular(8),
                                validator: (input) =>
                                    input == '' ? "Wajib diisi" : null,
                              ),
                            ],
                          ),
                          DView.height(20),
                          SizedBox(
                            width: double.infinity,
                            child: ElevatedButton(
                              onPressed: () => execute(),
                              style: ElevatedButton.styleFrom(
                                backgroundColor: AppColors.btnYellow,
                                padding: const EdgeInsets.symmetric(
                                  vertical: 14,
                                ),
                                shape: RoundedRectangleBorder(
                                  borderRadius: BorderRadius.circular(8),
                                ),
                              ),
                              child: const Text(
                                'Masuk',
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 16, // Ukuran teks
                                  fontWeight: FontWeight.bold,
                                ),
                              ),
                            ),
                          ),
                          DView.height(8),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              const Text(
                                "Belum punya akun? ",
                                style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 14,
                                ),
                              ),
                              GestureDetector(
                                onTap: () {
                                  Navigator.push(
                                    context,
                                    MaterialPageRoute(
                                        builder: (context) =>
                                            const RegisterPage()),
                                  );
                                },
                                child: const Text(
                                  "Register disini",
                                  style: TextStyle(
                                    color: Colors.white,
                                    fontWeight: FontWeight.bold,
                                    fontSize: 14,
                                  ),
                                ),
                              ),
                            ],
                          ),
                          DView.height(120),
                          const Center(
                            child: Text(
                              AppConstants.copyright,
                              style: TextStyle(
                                fontSize: 12,
                                color: Colors.white,
                              ),
                            ),
                          ),
                          DView.height(8),
                        ],
                      ),
                    )
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
Editor is loading...
Leave a Comment