import 'package:flutter/material.dart';
import '../../app/constant.dart';

class SplashScreen extends StatelessWidget {
  const SplashScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: ListView(
          children: [
            Container(
              // width: Constant.getActualXPhone(context: context, x: 390),
              height: Constant.getActualYPhone(context: context, y: 844),
              decoration: BoxDecoration(
                color: Colors.blue, // Ganti dengan warna dan gambar yang sesuai
                image: DecorationImage(
                  fit: BoxFit.fill,
                  image: AssetImage(
                      'images/background_splash.png'), // Ganti dengan path gambar yang diinginkan
                ),
              ),
              child: Align(
                alignment: Alignment.center,
                child: Container(
                  width: Constant.getActualXPhone(context: context, x: 200),
                  height: Constant.getActualYPhone(context: context, y: 200),
                  decoration: BoxDecoration(
                    // color: Colors.green,
                    image: DecorationImage(
                      // fit: BoxFit.contain,
                      image: AssetImage('images/logo_sismedika_rectangle.png'),
                    ),
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
