52 lines
1.6 KiB
Dart
52 lines
1.6 KiB
Dart
import 'package:aman_kassa_flutter/redux/actions/user_actions.dart';
|
|
import 'package:aman_kassa_flutter/redux/state/user_state.dart';
|
|
import 'package:aman_kassa_flutter/redux/store.dart';
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
|
|
|
|
class StartUpView extends StatefulWidget {
|
|
@override
|
|
_StartUpViewState createState() => _StartUpViewState();
|
|
}
|
|
|
|
class _StartUpViewState extends State<StartUpView> {
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
Redux.store.dispatch(checkUserAction);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
print(MediaQuery.of(context).size.width);
|
|
print(MediaQuery.of(context).size.height);
|
|
ScreenUtil.init(context, width: 411.43, height: 683.43, allowFontScaling: false);
|
|
return StoreConnector<AppState, UserState>(
|
|
converter: (store) => store.state.userState,
|
|
builder: (context, userState) {
|
|
return Scaffold(
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: <Widget>[
|
|
SizedBox(
|
|
width: 500,
|
|
height: 200,
|
|
child: Image.asset('assets/images/icon_large.png'),
|
|
),
|
|
CircularProgressIndicator(
|
|
strokeWidth: 3,
|
|
valueColor: AlwaysStoppedAnimation(
|
|
Colors.yellow[300],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
));
|
|
});
|
|
}
|
|
}
|