feat: Implement pull-to-refresh functionality on the agent detail screen by adding a refresh method to the provider and integrating a RefreshIndicator.
This commit is contained in:
1 parent
d3f49565d3
commit
de4a7b8040
3 files changed
+49
-15
No files matched your search
@@ -92,8 +92,14 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
||||
|
||||
Widget _buildContent(AgentDetailState state) {
|
||||
final agent = state.agent!;
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
return RefreshIndicator(
|
||||
color: AppColors.accentOrange,
|
||||
onRefresh: () => ref
|
||||
.read(agentDetailProvider(widget.agentId).notifier)
|
||||
.refresh(),
|
||||
child: SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Column(
|
||||
children: [
|
||||
// ── Avatar Section ──
|
||||
const SizedBox(height: 16),
|
||||
@@ -132,6 +138,7 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user