PackageScanner constructor

PackageScanner({
  1. BuildContext? context,
  2. List<String>? packageScan,
  3. FilterConfig? filterConfig,
})

Implementation

factory PackageScanner({
  BuildContext? context,
  List<String>? packageScan,
  FilterConfig? filterConfig,
}) {
  PackageScanner scanner = PackageScanner._(
    WinterRouter(),
    context ?? BuildContext(),
    //cant be const bc 'Unsupported operation: Cannot add to an unmodifiable list'
    //ignore: prefer_const_constructors
    filterConfig ?? FilterConfig([]),
    packageScan: packageScan ?? [],
  );

  scanner._scan();

  return scanner;
}