WithLicense<TLicense> constructor

WithLicense<TLicense>({
  1. Key? key,
  2. required LicenseDescriptor<TLicense> license,
  3. bool? isLicensed,
  4. required Widget child,
  5. ValueSetter<LicenseDescriptor<TLicense>>? onLicenseTap,
  6. bool withBanner = false,
  7. DecorationBuilder<LicenseDescriptor<TLicense>>? bannerDecorationBuilder,
  8. Decoration? notLicensedDecoration,
})

Implementation

WithLicense({
  Key? key,
  required this.license,
  bool? isLicensed,
  required this.child,
  ValueSetter<LicenseDescriptor<TLicense>>? onLicenseTap,
  this.withBanner = false,
  this.bannerDecorationBuilder,
  this.notLicensedDecoration,
}) : super(key: key) {
  final controller = LicenseController.instance as LicenseController<TLicense, dynamic>;

  _onLicenseTap = onLicenseTap ?? controller.onLicenseTap;

  this.isLicensed = isLicensed ?? controller.isLicensed(this.license);
}