gmana 0.2.0 copy "gmana: ^0.2.0" to clipboard
gmana: ^0.2.0 copied to clipboard

Convenience facade re-exporting gmana_functional, gmana_predicates, gmana_validation, gmana_utils, and gmana_extensions.

example/main.dart

// ignore_for_file: avoid_print
import 'package:gmana/gmana.dart';

Future<void> main() async {
  final duration = 90.seconds;
  final title = 'gmana facade'.toTitleCase;
  final scores = [8, 10, 7, 9];
  final email = const EmailValidator().validate(' User@Example.COM ');
  final id = IdGenerator.nanoid(size: 12);

  print('gmana facade');
  print('  title: $title');
  print('  duration: ${duration.toHHMMSS()}');
  print('  average score: ${scores.average}');
  print('  valid email: ${email.rightOrNull()}');
  print('  generated id: $id');
  print('  predicate email: ${isEmail('hello@example.com')}');

  final numbers = Stream.fromIterable([1, 2, 3]);
  final totals = await numbers.scan(0, (sum, value) => sum + value).toList();

  print('  running totals: $totals');
}
2
likes
160
points
410
downloads

Documentation

API reference

Publisher

verified publishergmana.co

Weekly Downloads

Convenience facade re-exporting gmana_functional, gmana_predicates, gmana_validation, gmana_utils, and gmana_extensions.

Repository (GitHub)
View/report issues

Topics

#extensions #utility #validator #functional-programming

License

MIT (license)

Dependencies

gmana_extensions, gmana_functional, gmana_predicates, gmana_utils, gmana_validation

More

Packages that depend on gmana