ContextMenuItem constructor
ContextMenuItem({
- dynamic id,
- @Deprecated("Use id instead") int? androidId,
- @Deprecated("Use id instead") String? iosId,
- required String title,
- dynamic action()?,
Implementation
ContextMenuItem(
{this.id,
@Deprecated("Use id instead") this.androidId,
@Deprecated("Use id instead") this.iosId,
required this.title,
this.action}) {
if (Util.isAndroid) {
this.id = this.id ?? this.androidId;
assert(this.id is int);
} else if (Util.isIOS) {
this.id = this.id ?? this.iosId;
}
assert(this.id != null && (this.id is int || this.id is String));
}