step 3 : buat screen splash screen
This commit is contained in:
59
lib/screen/splash_screen.dart
Normal file
59
lib/screen/splash_screen.dart
Normal 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user