-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathuser_info.dart
More file actions
35 lines (33 loc) · 1.06 KB
/
user_info.dart
File metadata and controls
35 lines (33 loc) · 1.06 KB
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
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebasestarter/core/presentation/res/analytics.dart';
import 'package:firebasestarter/generated/l10n.dart';
import '../../data/model/user_repository.dart';
class UserInfoPage extends StatelessWidget {
final User? user;
const UserInfoPage({Key? key, this.user}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(S.of(context)!.profilePageTitle),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(user!.email!),
RaisedButton(
child: Text(S.of(context)!.logoutButtonText),
onPressed: () {
logEvent(context, AppAnalyticsEvents.logOut);
Provider.of<UserRepository>(context, listen: false).signOut();
},
)
],
),
),
);
}
}