compute 1.0.2 copy "compute: ^1.0.2" to clipboard
compute: ^1.0.2 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
150
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