You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
808 B
28 lines
808 B
2 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||
|
|
||
|
import '../../provider/title_provider.dart';
|
||
|
|
||
|
class HomeScreen extends HookConsumerWidget {
|
||
|
const HomeScreen({Key? key}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||
|
final isInit = useState(true);
|
||
|
if (isInit.value) {
|
||
|
isInit.value = false;
|
||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||
|
ref.read(webTitleProvider.notifier).state = "Page Not Found";
|
||
|
});
|
||
|
}
|
||
|
final size = MediaQuery.of(context).size;
|
||
|
return Material(
|
||
|
child: SizedBox(
|
||
|
height: size.height,
|
||
|
width: size.width,
|
||
|
child: Center(child: Text("404 Page Not Found"))),
|
||
|
);
|
||
|
}
|
||
|
}
|