2023-01-08 22:27:33 -05:00
|
|
|
import 'package:flutter/material.dart';
|
2023-01-09 22:50:34 -05:00
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
2023-01-08 22:27:33 -05:00
|
|
|
|
2023-01-09 22:50:34 -05:00
|
|
|
class HomePage extends ConsumerWidget {
|
|
|
|
const HomePage({super.key});
|
|
|
|
static const path = '/home';
|
2023-01-08 22:27:33 -05:00
|
|
|
|
|
|
|
@override
|
2023-01-09 22:50:34 -05:00
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
2023-01-08 22:27:33 -05:00
|
|
|
return Scaffold(
|
2023-01-09 22:50:34 -05:00
|
|
|
appBar: AppBar(title: const Text("VeilidChat")),
|
2023-01-08 22:27:33 -05:00
|
|
|
body: Center(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
2023-01-09 22:50:34 -05:00
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
const Text("Home Page"),
|
|
|
|
ElevatedButton(
|
|
|
|
onPressed: () {
|
|
|
|
ref.watch(authNotifierProvider.notifier).logout();
|
|
|
|
},
|
|
|
|
child: const Text("Logout"),
|
2023-01-08 22:27:33 -05:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|