SnackRoute<T> constructor

SnackRoute<T>(
  1. {@required GetBar<Object> snack,
  2. RouteSettings settings}
)

Implementation

SnackRoute({
  @required this.snack,
  RouteSettings settings,
}) : super(settings: settings) {
  _builder = Builder(builder: (innerContext) {
    return GestureDetector(
      child: snack,
      onTap: snack.onTap != null ? () => snack.onTap(snack) : null,
    );
  });

  _configureAlignment(snack.snackPosition);
  _snackbarStatus = snack.snackbarStatus;
}