25 lines
610 B
Dart
25 lines
610 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:phone_login/auth/auth_state.dart';
|
|
|
|
class ProfileScreen extends StatelessWidget {
|
|
const ProfileScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final authState = Provider.of<AuthState>(context, listen: false);
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text('Profile')),
|
|
body: Center(
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
authState.toggleLogin();
|
|
},
|
|
child: const Text('Logout'),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|