fix buscador en release
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
@@ -184,6 +185,11 @@ class VideosProvider extends ChangeNotifier {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Force rebuild after rows are built (important for release mode)
|
||||
scheduleMicrotask(() {
|
||||
notifyListeners();
|
||||
});
|
||||
}
|
||||
|
||||
/// Format duration in seconds to human readable
|
||||
@@ -886,7 +892,10 @@ class VideosProvider extends ChangeNotifier {
|
||||
if (query.isEmpty) {
|
||||
_buildPlutoRows();
|
||||
gridRebuildKey++;
|
||||
notifyListeners();
|
||||
// Force rebuild in release mode
|
||||
scheduleMicrotask(() {
|
||||
notifyListeners();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -925,7 +934,12 @@ class VideosProvider extends ChangeNotifier {
|
||||
}
|
||||
|
||||
gridRebuildKey++;
|
||||
notifyListeners();
|
||||
// Force rebuild in release mode using scheduleMicrotask
|
||||
scheduleMicrotask(() {
|
||||
notifyListeners();
|
||||
// Also notify state manager if available
|
||||
stateManager?.notifyListeners();
|
||||
});
|
||||
}
|
||||
|
||||
// ========== CLEANUP ==========
|
||||
|
||||
Reference in New Issue
Block a user