perf: defer initial data fetching to microtasks and update loading placeholders for smoother screen transitions
This commit is contained in:
@@ -449,7 +449,10 @@ class AgentDetailNotifier extends StateNotifier<AgentDetailState> {
|
||||
|
||||
AgentDetailNotifier(this._repo, this.agentId)
|
||||
: super(const AgentDetailState()) {
|
||||
_load();
|
||||
// Defer the network burst to the next microtask so the agent detail
|
||||
// screen's first frame (loading placeholder) paints before the three
|
||||
// parallel HTTP requests kick off — smoother slide-in transition.
|
||||
Future.microtask(_load);
|
||||
// Listen for real-time connection response (accepted/rejected)
|
||||
_connectionResponseSub =
|
||||
SocketService().onConnectionResponse.listen((_) {
|
||||
|
||||
Reference in New Issue
Block a user