step 3 : buat screen splash screen

This commit is contained in:
sindhu
2025-02-15 12:01:35 +07:00
parent a3bb43c8fd
commit d70b20f5ff
9 changed files with 327 additions and 112 deletions

View File

@@ -0,0 +1,59 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import '../app/constant.dart';
class SplashScreen extends HookConsumerWidget {
const SplashScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [
SystemUiOverlay.bottom,
]);
return Scaffold(
backgroundColor: Constant.textWhite,
body: Column(
children: [
// atas
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
width: Constant.getActualXPhone(context: context, x: 246),
child: Image.asset(
'images/splashatas.png',
fit: BoxFit.fitWidth,
),
),
],
),
Spacer(),
// logo
Center(
child: Image.asset(
'images/logo.png',
width: Constant.getActualXPhone(context: context, x: 164),
),
),
Spacer(),
// bawah
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: Constant.getActualXPhone(context: context, x: 246),
child: Image.asset(
'images/splashbawah.png',
fit: BoxFit.fitWidth,
),
),
],
),
],
),
);
}
}