mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-10 14:09:27 +01:00
18 lines
594 B
Dart
18 lines
594 B
Dart
import 'package:famedlysdk/famedlysdk.dart';
|
|
import 'package:vrouter/vrouter.dart';
|
|
import 'package:fluffychat/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((_) => context.vRouter.push(
|
|
Matrix.of(context).loginState == LoginState.logged
|
|
? '/rooms'
|
|
: '/home'));
|
|
}
|
|
return Scaffold(body: Center(child: CircularProgressIndicator()));
|
|
}
|
|
}
|