toJson method
Implementation
@override
String? toJson(TargetPlatform? object) {
if (object == null) return null;
switch (object) {
case TargetPlatform.android:
return 'android';
case TargetPlatform.fuchsia:
return 'fuchsia';
case TargetPlatform.iOS:
return 'iOS';
case TargetPlatform.linux:
return 'linux';
case TargetPlatform.macOS:
return 'macOS';
case TargetPlatform.windows:
return 'windows';
}
}