fluffychat/lib/views/widgets/loading_view.dart
2021-04-15 10:14:21 +02:00

15 lines
522 B
Dart

import 'package:adaptive_page_layout/adaptive_page_layout.dart';
import 'package:fluffychat/views/widgets/matrix.dart';
import 'package:flutter/material.dart';
class LoadingView extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (Matrix.of(context).loginState != null) {
WidgetsBinding.instance.addPostFrameCallback((_) =>
AdaptivePageLayout.of(context).pushNamedAndRemoveAllOthers('/'));
}
return Scaffold(body: Center(child: CircularProgressIndicator()));
}
}