-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauth_screen.dart
43 lines (37 loc) · 1.11 KB
/
auth_screen.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:retrotrack/core/index.dart';
import 'package:retrotrack/ui/index.dart';
class AuthScreen extends StatelessWidget {
const AuthScreen();
@override
Widget build(BuildContext context) {
return Consumer<SessionProvider>(
builder: (_, SessionProvider session, __) {
if (session.isAuth) {
return const Redirect('/', removeUntilRoot: true);
}
return Scaffold(
body: SizedBox(
width: MediaQuery.of(context).size.width,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
const Logo(showImage: true),
const SizedBox(height: 16.0),
//
RetroOutlineButton(
onPressed: () {
session.login();
},
text: 'login',
),
],
),
),
);
},
);
}
}