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

A starting point for Dart libraries or applications.

example/example.dart

import 'package:tc_dart_core/tc_dart_core.dart';


void main() {
  const wordings = 'Hello word!';

  // normal print
  print(wordings);

  // colorized string
  print(ColorStr.red(wordings));
  print(ColorStr.cyan(wordings));
  print(ColorStr.black(wordings));
  print(ColorStr.yellow(wordings));
  print(ColorStr.green(wordings));

  //  print object
  final aPerson  = Person();
  print(aPerson.toString());
  print(ColorStr.red(aPerson));

}

class Person {
  int age = 22;
  String name = 'tcui';

  @override
  String toString() {
    return 'My name is $name, and I\'m $age years old.';
  }
}
0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

A starting point for Dart libraries or applications.

Homepage

License

MIT (LICENSE)

More

Packages that depend on tc_dart_core