Can constructor
const
Can({})
Creates a Can widget that displays child if permission is granted.
Irepresents the action being checked.arepresents the subject being checked.childis displayed if permission is granted.fallbackis displayed if permission is denied (defaults to an empty widget).- If
notistrue, the logic is reversed, displayingchildwhen permission is denied.
Implementation
const Can({
Key? key,
required this.I,
required this.a,
required this.child,
this.not = false,
this.fallback,
}) : abilityBuilder = null,
super(key: key);