2021-01-17 08:05:34 +01:00
|
|
|
import 'package:adaptive_page_layout/adaptive_page_layout.dart';
|
|
|
|
import 'package:fluffychat/components/matrix.dart';
|
2021-01-16 12:46:38 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class LoadingView extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-01-17 08:05:34 +01:00
|
|
|
if (Matrix.of(context).loginState != null) {
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) =>
|
|
|
|
AdaptivePageLayout.of(context).pushNamedAndRemoveAllOthers('/'));
|
|
|
|
}
|
2021-01-16 15:13:29 +01:00
|
|
|
return Scaffold(
|
|
|
|
body: Center(
|
|
|
|
child: CircularProgressIndicator(),
|
|
|
|
),
|
2021-01-16 12:46:38 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|