basics 0.10.0 copy "basics: ^0.10.0" to clipboard
basics: ^0.10.0 copied to clipboard

A Dart library containing convenient extension methods on basic Dart objects.

example/main.dart

// Copyright (c) 2020, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

import 'package:basics/basics.dart';

void main() async {
  const numbers = <int>[2, 4, 8];

  if (numbers.all((n) => n.isEven)) {
    print('All numbers are even.');
  }

  print('sum of numbers is: ${numbers.sum()}');

  for (var _ in 5.range) {
    print('waiting 500 milliseconds...');
    await Future<void>.delayed(500.milliseconds);
  }
}
95
likes
140
pub points
92%
popularity

Publisher

verified publishergoogle.dev

A Dart library containing convenient extension methods on basic Dart objects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

characters

More

Packages that depend on basics