Dart: Libraries

# Importing a library in Dart

import 'URI'
import 'dart:io' 
import 'package:lib1/libfile.dart' 
import 'package: lib1/lib1.dart' show foo, bar;  
// Import only foo and bar. 

import 'package: mylib/mylib.dart' hide foo;  
// Import all names except foo

# Commonly used libraries

dart:ioFile, socket, HTTP, and other I/O support for server applications. This library does not work in browser-based applications. This library is imported by default.
dart:coreBuilt-in types, collections, and other core functionality for every Dart program. This library is automatically imported.
dart: mathMathematical constants and functions, plus a random number generator.
dart: convertEncoders and decoders for converting between different data representations, including JSON and UTF-8.
dart: typed_dataLists that efficiently handle fixed sized data (for example, unsigned 8 byte integers).

Leave a Reply

Your email address will not be published. Required fields are marked *