Sporran constructor Null safety

Sporran(
  1. SporranInitialiser initialiser
)

Construction.

Implementation

Sporran(SporranInitialiser initialiser) {
  _dbName = initialiser.dbName;

  // Construct our database.
  _database = _SporranDatabase(
      _dbName,
      initialiser.hostname,
      initialiser.manualNotificationControl,
      initialiser.port,
      initialiser.scheme,
      initialiser.username,
      initialiser.password,
      initialiser.preserveLocal);

  // Online/offline listeners
  window.onOnline.listen((_) => _transitionToOnline());
  window.onOffline.listen((_) => _online = false);
}