fix: Load urls directly

This commit is contained in:
Christian Pauly 2021-06-10 10:20:00 +02:00
commit 8dff85626e
4 changed files with 36 additions and 6 deletions

View file

@ -41,7 +41,7 @@ class OnePageCard extends StatelessWidget {
vertical:
max((MediaQuery.of(context).size.height - 800) / 2, 12),
),
child: SafeArea(child: Card(child: child)),
child: SafeArea(child: Card(elevation: 7, child: child)),
),
);
}

View file

@ -0,0 +1,24 @@
import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter/material.dart';
import '../matrix.dart';
class WaitForInitPage extends StatelessWidget {
final Widget page;
const WaitForInitPage(this.page, {Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
if (Matrix.of(context).loginState == null) {
return StreamBuilder<LoginState>(
stream: Matrix.of(context).client.onLoginStateChanged.stream,
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Scaffold(body: Center(child: CircularProgressIndicator()));
}
return page;
});
}
return page;
}
}