|
1 | | -/// To see the error code, see AdError.code. |
2 | | -/// To see a description of the error, see AdError.message. |
3 | | -/// See CODE constants for a list of error codes. |
| 1 | +/// Use [code] to retrieve the error code. |
| 2 | +/// Use [message] to get a human-readable error description. |
| 3 | +/// See `code` constants for all available error codes. |
4 | 4 | class AdError implements Comparable<int> { |
5 | 5 | /// Indicates an internal error occurred. |
6 | 6 | static const int codeInternalError = 0; |
7 | 7 |
|
| 8 | + /// Indicates that ads are not ready to be shown. |
| 9 | + /// Ensure to call the appropriate ad loading method or use automatic cache mode. |
| 10 | + /// If using automatic load mode, wait a little longer for ads to be ready. |
| 11 | + static const int codeNotReady = 1; |
| 12 | + |
8 | 13 | /// Indicates that the device is rejected for services. |
9 | 14 | /// Services may not be available for some devices that do not meet the requirements. |
10 | 15 | /// For example, the country or version of the OS. |
11 | | - static const int rejected = 2; |
| 16 | + static const int codeRejected = 2; |
12 | 17 |
|
13 | 18 | /// Indicates that no ads are available to be served. |
14 | 19 | /// If ads are visible in demo mode, your implementation is correct, and ads will be served once live. |
15 | 20 | static const int codeNoFill = 3; |
16 | 21 |
|
17 | | - /// Indicates that ads are not ready to be shown. |
18 | | - /// Ensure to call the appropriate ad loading method or use automatic cache mode. |
19 | | - /// If using automatic load mode, wait a little longer for ads to be ready. |
20 | | - static const int codeNotReady = 1; |
21 | | - |
22 | 22 | /// Indicates that the ad creative has reached its daily cap for the user. |
23 | 23 | /// This is typically relevant for cross-promotion ads only. |
24 | 24 | static const int codeReachedCap = 6; |
@@ -77,4 +77,8 @@ class AdError implements Comparable<int> { |
77 | 77 |
|
78 | 78 | @override |
79 | 79 | int compareTo(int other) => code.compareTo(other); |
| 80 | + |
| 81 | + /// Renamed to [codeRejected] |
| 82 | + @Deprecated("Renamed to codeRejected") |
| 83 | + static const int rejected = codeRejected; |
80 | 84 | } |
0 commit comments