Files
phone_login/lib/profile/profile_screen.dart

25 lines
610 B
Dart
Raw Normal View History

2026-01-19 14:56:39 +08:00
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'),
),
),
);
}
}