toMap method
- EnumMethod? enumMethod,
Converts instance to a map.
Implementation
Map<String, dynamic> toMap({EnumMethod? enumMethod}) {
return {
"hasGesture": hasGesture,
"isForMainFrame": isForMainFrame,
"isRedirect": isRedirect,
"navigationType": switch (enumMethod ?? EnumMethod.nativeValue) {
EnumMethod.nativeValue => navigationType?.toNativeValue(),
EnumMethod.value => navigationType?.toValue(),
EnumMethod.name => navigationType?.name(),
},
"request": request.toMap(enumMethod: enumMethod),
"shouldPerformDownload": shouldPerformDownload,
"sourceFrame": sourceFrame?.toMap(enumMethod: enumMethod),
"targetFrame": targetFrame?.toMap(enumMethod: enumMethod),
};
}