open method

  1. @override
void open(
  1. BuildContext context,
  2. InspectionLocation data,
  3. MyListTileData tiledata
)
override

when pressed on a tile in the DropDownPage this will be invoked

Implementation

@override
void open(
  BuildContext context,
  InspectionLocation data,
  MyListTileData tiledata,
) {
  currentlyChosenChildData = Future.value(data);
  if (tiledata.title == _nextViewTitle) {
    unawaited(_openInspection(context, data));
    return;
  }

  Navigator.of(context).push(
    MaterialPageRoute(builder: (context) {
      switch (tiledata.title) {
        case 'Fotos':
          return standard_statefulImageView(this, data);
        case 'Docs':
          return DokusList(
            dokus: data.dokuspaths,
            scope: API().local.scopeFor(data),
          );
        default:
          return LocationDetailPage(
            locationdata: data,
          );
      }
    }),
  );
}