first commit

This commit is contained in:
kicap
2024-02-04 20:57:23 +08:00
commit 27c529dad9
162 changed files with 8557 additions and 0 deletions

View File

@ -0,0 +1,94 @@
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>.nonReactive(
viewModelBuilder: () => SplashScreenViewModel(),
onViewModelReady: (SplashScreenViewModel model) async {
await model.init();
},
builder: (
BuildContext context,
SplashScreenViewModel model,
Widget? child,
) {
return WillPopScope(
onWillPop: () async => false,
child: Scaffold(
// backgroundColor: warningColor,
body: SafeArea(
child: Center(
child: Column(
children: [
const Expanded(
flex: 1,
child: SizedBox(
height: 100,
),
),
Image.asset(
'assets/logo.png',
width: 200,
height: 200,
),
const SizedBox(
height: 10,
),
Text(
'KAMUS MEDIS DAN KESEHATAN',
style: boldTextStyle.copyWith(
// color: backgroundColor,
fontSize: 20,
),
textAlign: TextAlign.center,
),
// Text(
// '(Survei App)',
// style: boldTextStyle.copyWith(
// // color: backgroundColor,
// fontStyle: FontStyle.italic,
// ),
// textAlign: TextAlign.center,
// ),
const Expanded(child: SizedBox()),
Text(
'Created By',
style: regularTextStyle.copyWith(
fontSize: 12,
),
textAlign: TextAlign.center,
),
Text(
'Kicap Karan',
style: boldTextStyle.copyWith(
fontSize: 13,
fontStyle: FontStyle.italic,
),
textAlign: TextAlign.center,
),
Text(
'www.kicap-karan.com',
style: boldTextStyle.copyWith(
fontSize: 13,
),
),
const SizedBox(
height: 20,
)
],
),
),
),
),
);
},
);
}
}

View File

@ -0,0 +1,16 @@
import '../../../app/app.locator.dart';
import '../../../app/app.logger.dart';
import '../../../app/app.router.dart';
import '../../../app/core/custom_base_view_model.dart';
import '../../../services/my_tts.dart';
class SplashScreenViewModel extends CustomBaseViewModel {
final log = getLogger('SplashScreenViewModel');
final myTts = locator<MyTts>();
Future<void> init() async {
await myTts.init();
// await 3 seconds then go to login
// await Future.delayed(const Duration(seconds: 3));
await navigationService.navigateTo(Routes.userTrackingIndexView);
}
}