🐛 Trying to fix app scaffold focus conflict
This commit is contained in:
@@ -357,21 +357,12 @@ class AppScaffold extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final focusNode = useFocusNode();
|
|
||||||
|
|
||||||
useEffect(() {
|
|
||||||
focusNode.requestFocus();
|
|
||||||
return null;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
final appBarHeight = appBar?.preferredSize.height ?? 0;
|
final appBarHeight = appBar?.preferredSize.height ?? 0;
|
||||||
final safeTop = MediaQuery.of(context).padding.top;
|
final safeTop = MediaQuery.of(context).padding.top;
|
||||||
|
|
||||||
final noBackground = isNoBackground ?? isWideScreen(context);
|
final noBackground = isNoBackground ?? isWideScreen(context);
|
||||||
|
|
||||||
final builtWidget = Focus(
|
final builtWidget = Scaffold(
|
||||||
focusNode: focusNode,
|
|
||||||
child: Scaffold(
|
|
||||||
extendBody: extendBody ?? true,
|
extendBody: extendBody ?? true,
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
@@ -394,7 +385,6 @@ class AppScaffold extends HookConsumerWidget {
|
|||||||
floatingActionButtonAnimator: floatingActionButtonAnimator,
|
floatingActionButtonAnimator: floatingActionButtonAnimator,
|
||||||
onDrawerChanged: onDrawerChanged,
|
onDrawerChanged: onDrawerChanged,
|
||||||
onEndDrawerChanged: onEndDrawerChanged,
|
onEndDrawerChanged: onEndDrawerChanged,
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return noBackground
|
return noBackground
|
||||||
|
|||||||
Reference in New Issue
Block a user