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

outdated

Useful extension methods such as forEachIndexed, roundPrecision etc.

example/main.dart

import 'package:kt_utils/kt_utils.dart';

void main(List<String> args) {
  // String
  var word = 'Lorem';
  word = word.toCapitalize();

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

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

  print('10.3'.toDouble());

  // 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
0
pub points
29%
popularity

Publisher

unverified uploader

Useful extension methods such as forEachIndexed, roundPrecision etc.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on kt_utils