You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
973 B
Dart
39 lines
973 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hmg_nurses/services/api_repo/login_api_repo.dart';
|
|
import 'package:hmg_nurses/services/firebase_service.dart';
|
|
import 'package:injector/injector.dart';
|
|
|
|
import '../../classes/utils.dart';
|
|
|
|
class SplashPage extends StatefulWidget {
|
|
@override
|
|
State<SplashPage> createState() => _SplashPageState();
|
|
}
|
|
|
|
class _SplashPageState extends State<SplashPage> {
|
|
final ILoginApiRepo _loginApiRepo = Injector.appInstance.get<ILoginApiRepo>();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
getData();
|
|
}
|
|
|
|
getData() async {
|
|
try {
|
|
await _loginApiRepo.getDeviceInfoByIMEI();
|
|
await _loginApiRepo.getProjectInfo("userId");
|
|
await _loginApiRepo.memberLogin("13777", "Rr123456", 12);
|
|
} catch (e) {
|
|
Utils.handleException(e, context, (msg) {
|
|
Utils.confirmDialog(context, msg);
|
|
});
|
|
}
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold();
|
|
}
|
|
}
|