run<T> static method
Implementation
static Future<T> run<T>(
String message,
Future<T> Function() task,
) async {
final spinner = Spinner(message);
spinner.start();
try {
final result = await task();
spinner.stop('✓ $message');
return result;
} catch (e) {
spinner.stop('✗ $message');
rethrow;
}
}