Skip to content

Commit a429beb

Browse files
committed
opt.
1 parent 6a38fcf commit a429beb

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/view/page/ssh/page/ask_ai.dart

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,14 +390,19 @@ class _AskAiSheetState extends ConsumerState<_AskAiSheet> {
390390
final bottomPadding = MediaQuery.viewInsetsOf(context).bottom;
391391
final heightFactor = _isMinimized ? 0.18 : 0.85;
392392

393-
return AnimatedSize(
393+
return TweenAnimationBuilder<double>(
394+
tween: Tween<double>(end: heightFactor),
394395
duration: const Duration(milliseconds: 200),
395396
curve: Curves.easeOutCubic,
396-
alignment: Alignment.topCenter,
397-
child: ClipRect(
398-
child: FractionallySizedBox(
399-
heightFactor: heightFactor,
400-
child: SafeArea(
397+
builder: (context, animatedHeightFactor, child) {
398+
return ClipRect(
399+
child: FractionallySizedBox(
400+
heightFactor: animatedHeightFactor,
401+
child: child,
402+
),
403+
);
404+
},
405+
child: SafeArea(
401406
child: Column(
402407
children: [
403408
Padding(
@@ -499,8 +504,6 @@ class _AskAiSheetState extends ConsumerState<_AskAiSheet> {
499504
],
500505
),
501506
),
502-
),
503-
),
504507
);
505508
}
506509
}

0 commit comments

Comments
 (0)