operator >> method

dynamic operator >>(
  1. dynamic value
)

Implementation

operator >>(dynamic value) {
  if (value is Widget){
    nextPage = value;
  }
  else if (value is void Function() ){
    onPressed = value;
  }
  else {
    throw Exception("Unhandled value type ${value.runtimeType}");
  }
  return this;
}