fix: Load urls directly
This commit is contained in:
parent
88211f7884
commit
8dff85626e
4 changed files with 36 additions and 6 deletions
|
|
@ -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)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
24
lib/widgets/layouts/wait_for_login.dart
Normal file
24
lib/widgets/layouts/wait_for_login.dart
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue