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"))), ); } }