🐛 Make the background image not responsive for virtual keyboard to provide better visual experience on iOS 26

This commit is contained in:
2025-10-14 22:53:59 +08:00
parent 61074bc5a3
commit cda23db609
2 changed files with 17 additions and 18 deletions

View File

@@ -126,6 +126,7 @@ class TabsScreen extends HookConsumerWidget {
return Scaffold( return Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
extendBody: true, extendBody: true,
resizeToAvoidBottomInset: false,
body: ClipRRect( body: ClipRRect(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16), topLeft: Radius.circular(16),

View File

@@ -314,28 +314,22 @@ class AppScaffold extends HookConsumerWidget {
final noBackground = isNoBackground ?? isWideScreen(context); final noBackground = isNoBackground ?? isWideScreen(context);
final content = Column( final builtWidget = Focus(
children: [
IgnorePointer(
child: SizedBox(height: appBar != null ? appBarHeight + safeTop : 0),
),
if (body != null) Expanded(child: body!),
],
);
return Focus(
focusNode: focusNode, focusNode: focusNode,
child: Scaffold( child: Scaffold(
extendBody: extendBody ?? true, extendBody: extendBody ?? true,
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
backgroundColor: backgroundColor: Colors.transparent,
noBackground body: Column(
? Colors.transparent children: [
: Theme.of(context).scaffoldBackgroundColor, IgnorePointer(
body: child: SizedBox(
noBackground height: appBar != null ? appBarHeight + safeTop : 0,
? content ),
: AppBackground(isRoot: true, child: content), ),
if (body != null) Expanded(child: body!),
],
),
appBar: appBar, appBar: appBar,
bottomNavigationBar: bottomNavigationBar, bottomNavigationBar: bottomNavigationBar,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
@@ -348,6 +342,10 @@ class AppScaffold extends HookConsumerWidget {
onEndDrawerChanged: onEndDrawerChanged, onEndDrawerChanged: onEndDrawerChanged,
), ),
); );
return noBackground
? builtWidget
: AppBackground(isRoot: true, child: builtWidget);
} }
} }