fix(asset-page): fix scroll issue with LayoutBuilder and ConstrainedBox
Wrap content in LayoutBuilder + ConstrainedBox to ensure proper scrolling behavior when content exceeds viewport height. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
61da3652f5
commit
82a3c7a2c3
|
|
@ -31,12 +31,16 @@ class AssetPage extends ConsumerWidget {
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
bottom: false,
|
bottom: false,
|
||||||
child: RefreshIndicator(
|
child: LayoutBuilder(
|
||||||
|
builder: (context, constraints) {
|
||||||
|
return RefreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
ref.invalidate(shareAccountProvider(accountSequence));
|
ref.invalidate(shareAccountProvider(accountSequence));
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(minHeight: constraints.maxHeight),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 顶部导航栏
|
// 顶部导航栏
|
||||||
|
|
@ -81,6 +85,9 @@ class AssetPage extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue