2023-08-08 02:03:26 -04:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
|
|
|
|
import '../providers/window_control.dart';
|
|
|
|
import 'home.dart';
|
|
|
|
|
2023-12-26 20:26:54 -05:00
|
|
|
class ChatOnlyPage extends StatefulWidget {
|
2023-08-08 02:03:26 -04:00
|
|
|
const ChatOnlyPage({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
ChatOnlyPageState createState() => ChatOnlyPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class ChatOnlyPageState extends ConsumerState<ChatOnlyPage>
|
|
|
|
with TickerProviderStateMixin {
|
|
|
|
final _unfocusNode = FocusNode();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
setState(() {});
|
|
|
|
await ref.read(windowControlProvider.notifier).changeWindowSetup(
|
|
|
|
TitleBarStyle.normal, OrientationCapability.normal);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
_unfocusNode.dispose();
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ref.watch(windowControlProvider);
|
|
|
|
|
|
|
|
return SafeArea(
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () => FocusScope.of(context).requestFocus(_unfocusNode),
|
|
|
|
child: HomePage.buildChatComponent(context, ref),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|