You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) {
case0:// ATTrackingManagerAuthorizationStatusNotDetermined casebreak;
case1:// ATTrackingManagerAuthorizationStatusRestricted casebreak;
case2:// ATTrackingManagerAuthorizationStatusDenied casebreak;
case3:// ATTrackingManagerAuthorizationStatusAuthorized casebreak;
}
});
}
OR
(better fix) Let requestTrackingAuthorizationWithCompletionHandler return a double or int not a num
The text was updated successfully, but these errors were encountered:
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 numThe text was updated successfully, but these errors were encountered: