fbmobile/lib/ui/views/startup_view.dart
Varakh 2e7778926a
All checks were successful
continuous-integration/drone/tag Build is passing
Release 1.5.1+17 #noissue
2022-12-16 22:53:59 +01:00

27 lines
1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import '../../core/enums/viewstate.dart';
import '../../core/viewmodels/startup_model.dart';
class StartUpView extends StatelessWidget {
static const routeName = '/';
@override
Widget build(BuildContext context) {
return ViewModelBuilder<StartUpViewModel>.reactive(
viewModelBuilder: () => StartUpViewModel(),
onModelReady: (model) => model.handleStartUpLogic(),
builder: (context, model, child) => Scaffold(
body: model.state == ViewState.Busy
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircularProgressIndicator(),
(model.stateMessage!.isNotEmpty ? Text(model.stateMessage!) : Container())
]))
: Container()));
}
}