Check out example codes for "dartlang console plugin". It will help you in understanding the concepts better.

Code Example 1

import "package:console/console.dart";

void main() {
  // Initialize the Console. Throws an exception if advanced terminal features are not supported.
  Console.init();
  
  // Use the library...
}

Learn ReactJs, React Native from akashmittal.com