kt_utils 1.0.0 copy "kt_utils: ^1.0.0" to clipboard
kt_utils: ^1.0.0 copied to clipboard

Useful extension methods such as forEachIndexed, roundPrecision etc.

example/main.dart

import 'package:kt_utils/kt_utils.dart';

void main(List<String> args) {
  // String
  print('lorem'.toCapitalize());

  print('Lorem'.plus(' Ipsum'));

  print('Lorem Ipsum'.reversed());

  print('10'.toInt());

  print('10.3'.toDouble());

  print('lorem ipsum dolor'.toTitleCase());

  print('123abc'.containsDigit());

  print('abc@abc.test'.isEmailValid());

  // Double
  print(5.457.roundPrecision(1));

  // List
  List<String> ls = ['A', 'B', 'C', 'D'];

  ls.forEachIndexed((index, element) {
    print('Index $index - Element $element');
  });

  print(ls.random());

  print(ls.lastIndex);
}
5
likes
150
pub points
29%
popularity

Publisher

unverified uploader

Useful extension methods such as forEachIndexed, roundPrecision etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on kt_utils