developmentMode
will determine whether or not the app is in dev mode. If omitted,
a check for an environment variable called APP_ENV
having value 'development' will
be the default check.
servePort and buildDir can be used if the default serve and build options are not used with pub.
Source
PubMiddleware({
bool developmentMode,
this.servePort: 8080,
this.buildDir: 'build'
}) : developmentMode = developmentMode ?? Platform.environment['APP_ENV'] == 'development';