fbmobile/lib/ui/views/home_view.dart

25 lines
716 B
Dart
Raw Permalink Normal View History

2021-02-02 14:33:23 +00:00
import 'package:flutter/material.dart';
import 'package:flutter_translate/flutter_translate.dart';
import '../../core/enums/viewstate.dart';
import '../../core/viewmodels/home_model.dart';
import '../widgets/my_appbar.dart';
import 'base_view.dart';
class HomeView extends StatelessWidget {
static const routeName = '/home';
2023-01-04 20:17:54 +00:00
const HomeView({super.key});
2021-02-02 14:33:23 +00:00
@override
Widget build(BuildContext context) {
return BaseView<HomeModel>(
builder: (context, model, child) => Scaffold(
appBar: MyAppBar(title: Text(translate('app.title'))),
2023-01-16 00:44:34 +00:00
body: model.state == ViewState.busy
? const Center(child: CircularProgressIndicator())
: Container()),
2021-02-02 14:33:23 +00:00
);
}
}