GenerateScreenBindings constructor

const GenerateScreenBindings({
  1. String path = '',
  2. bool isAccessibleOnlyIfLoggedInAndVerified = false,
  3. bool isAccessibleOnlyIfLoggedIn = false,
  4. bool isAccessibleOnlyIfLoggedOut = false,
  5. bool isRedirectable = false,
  6. Set<Record> internalParameters = const {},
  7. Set<Record> queryParameters = const {},
  8. String defaultTitle = '...',
  9. String makeup = 'null',
  10. String? className,
  11. String? screenKey,
})

Generates boiler-plate code for the annotated screen class to make it accessible.

Implementation

const GenerateScreenBindings({
  this.path = '',
  this.isAccessibleOnlyIfLoggedInAndVerified = false,
  this.isAccessibleOnlyIfLoggedIn = false,
  this.isAccessibleOnlyIfLoggedOut = false,
  this.isRedirectable = false,
  this.internalParameters = const {},
  this.queryParameters = const {},
  this.defaultTitle = '...',
  this.makeup = 'null',
  this.className,
  this.screenKey,
})  : assert(
        !isAccessibleOnlyIfLoggedInAndVerified || !isAccessibleOnlyIfLoggedIn,
        'Cannot set both `isAccessibleOnlyIfLoggedInAndVerified` and `isAccessibleOnlyIfLoggedIn` to `true`.',
      ),
      assert(
        !isAccessibleOnlyIfLoggedInAndVerified ||
            !isAccessibleOnlyIfLoggedOut,
        'Cannot set both `isAccessibleOnlyIfLoggedInAndVerified` and `isAccessibleOnlyIfLoggedOut` to `true`.',
      ),
      assert(
        !isAccessibleOnlyIfLoggedIn || !isAccessibleOnlyIfLoggedOut,
        'Cannot set both `isAccessibleOnlyIfLoggedIn` and `isAccessibleOnlyIfLoggedOut` to `true`.',
      );