728x90
반응형
import 'dart:isolate';
int num = 10;
void change(var value) {
num = value;
print("change : ${num}");
}
void main() {
Isolate.spawn(change, 12);
change(9990);
}

728x90
반응형
'Flutter(dart)' 카테고리의 다른 글
| 변경된 위젯 이름들 (0) | 2022.11.16 |
|---|---|
| 다트 public과 private(언더스코어 _) (0) | 2022.11.15 |
| flutter 함수 동시 실행 isolate 쓰레드 예제 (0) | 2022.11.15 |
| flutter for문 반복문 (0) | 2022.11.15 |
| Could not find a file named "pubspec.yaml" (0) | 2022.11.09 |