VoyagerPath.fromMap constructor

VoyagerPath.fromMap({
  1. required String path,
  2. required Map<String, dynamic> config,
})

factory method for creating a single Voyager path instance from Map

Implementation

factory VoyagerPath.fromMap(
    {required String path, required Map<String, dynamic> config}) {
  if (config["type"] == null && config["redirect"] == null) {
    config["type"] = VoyagerUtils.typify(path);
  }
  return VoyagerPath._(path: path, config: config);
}