Created
January 31, 2021 13:54
-
-
Save alphamikle/ab0c8570c7cac4aad3c9a3c7ace98e08 to your computer and use it in GitHub Desktop.
Cache items function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Function for creating a copy of elements | |
/// used as source for filtering | |
void cacheItems() { | |
_notFilteredItems.clear(); | |
final List<Item> multipliedItems = []; | |
for (int i = 0; i < 10; i++) { | |
multipliedItems.addAll(items); | |
} | |
_notFilteredItems.addAll(multipliedItems); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment