const Request(T type, { V withData })

build a Request with an enum type and optional value

Source

const Request(T this.type, {V withData}):payload = withData;