Line data Source code
1 : /// An exception thrown when executing functionality which requires an Android 2 : /// while no activity is provided. 3 : /// 4 : /// This exception is thrown on Android only and might occur hen running a 5 : /// certain function from the background that requires a UI element (e.g. 6 : /// requesting permissions or enabling the location services). 7 : class ActivityMissingException implements Exception { 8 : /// Constructs the [ActivityMissingException] 9 2 : const ActivityMissingException(this.message); 10 : 11 : /// A [message] describing more details on the missing activity. 12 : final String? message; 13 : 14 1 : @override 15 : String toString() { 16 3 : if (message == null || message == '') { 17 : return 'Activity is missing. This might happen when running a certain ' 18 : 'function from the background that requires a UI element (e.g. ' 19 : 'requesting permissions or enabling the location services).'; 20 : } 21 1 : return message!; 22 : } 23 : }