The type 'num' is not exhaustively matched by the switch cases since it doesn't match 'double()'.
Try adding a default case or cases that match 'double()'.
Suggested changes:
(quick fix) Convert status to int in the example
if (Platform.isIOS) {
Adjust.requestTrackingAuthorizationWithCompletionHandler().then((statusNum) {
final status = statusNum.toInt();
switch (status) {
case 0:
// ATTrackingManagerAuthorizationStatusNotDetermined case
break;
case 1:
// ATTrackingManagerAuthorizationStatusRestricted case
break;
case 2:
// ATTrackingManagerAuthorizationStatusDenied case
break;
case 3:
// ATTrackingManagerAuthorizationStatusAuthorized case
break;
}
});
}
OR
(better fix) Let requestTrackingAuthorizationWithCompletionHandler return a double or int not a num
The Example here for App-tracking authorization wrapper has an error where the type num cant be used in the switch case, the error:
Suggested changes:
OR
requestTrackingAuthorizationWithCompletionHandler
return a double or int not a num