compute 0.1.0+1 copy "compute: ^0.1.0+1" to clipboard
compute: ^0.1.0+1 copied to clipboard

Flutter's compute function made available for all non-Flutter Dart programs

example/main.dart

import 'package:compute/compute.dart';

int square(int a) => a * a;

Future<void> main() async {
  final squared = await compute(square, 5);
  print('5^2=$squared');
}
22
likes
160
pub points
88%
popularity

Publisher

verified publisherdartside.dev

Flutter's compute function made available for all non-Flutter Dart programs

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

meta

More

Packages that depend on compute