WithLicense<TLicense> constructor
WithLicense<TLicense> ({
- Key? key,
- required LicenseDescriptor<
TLicense> license, - bool? isLicensed,
- required Widget child,
- ValueSetter<
LicenseDescriptor< ? onLicenseTap,TLicense> > - bool withBanner = false,
- DecorationBuilder<
LicenseDescriptor< ? bannerDecorationBuilder,TLicense> > - 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);
}