Created
September 2, 2025 12:26
-
-
Save tunitowen/8f69960c1119bd3c1db1968793e4c7ef to your computer and use it in GitHub Desktop.
Joii Compute
This file contains hidden or 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
| import 'package:flutter/foundation.dart'; | |
| void main() async { | |
| final value = await compute(getThing, "Hello World"); | |
| print(value); | |
| } | |
| String getThing(String string) { | |
| final list = List.generate(100000, (e) => e); | |
| for (final v in list) { | |
| print(v); | |
| } | |
| return string; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment