Files
currency-exchange/lib/ui/views/splash_screen/splash_screen_view.dart
2023-08-18 02:07:04 +08:00

63 lines
1.9 KiB
Dart

import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import '../../../app/themes/app_text.dart';
import './splash_screen_view_model.dart';
class SplashScreenView extends StatelessWidget {
const SplashScreenView({super.key});
@override
Widget build(BuildContext context) {
return ViewModelBuilder<SplashScreenViewModel>.reactive(
viewModelBuilder: () => SplashScreenViewModel(),
onViewModelReady: (SplashScreenViewModel model) async {
await model.init();
},
builder: (
BuildContext context,
SplashScreenViewModel model,
Widget? child,
) {
return WillPopScope(
onWillPop: () async {
return false;
},
child: Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Expanded(child: SizedBox(height: 20)),
Center(
child: Image.asset(
'assets/exchange.png',
width: 200,
height: 200,
),
),
const SizedBox(height: 20),
Text(
"Aplikasi\nTukaran Mata Wang",
style: italicTextStyle.copyWith(
fontSize: 20,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
const Expanded(child: SizedBox(height: 20)),
Text(
"Created by : Marlina & Andi Wafiah",
style: regularTextStyle.copyWith(fontSize: 12),
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
],
),
),
);
},
);
}
}