simple_telephony 0.0.1 simple_telephony: ^0.0.1 copied to clipboard
detects whether the device support phone calls
Simple Telephony #
Intro #
Detects whether the device support phone calls
Usage #
Here is an example of making a GET
to an endpoint that returns a list.
All you need is a model with a fromJson
constructor. This ensures you app only interacts with strongly typed models, not raw JSON lists and maps. Json_serializable is a commonly used dart package that provides this functionality.
bool isVoiceCapable = false;
try {
isVoiceCapable = await SimpleTelephony.isVoiceCapable ?? false;
} on PlatformException {
print('Failed to get isVoiceCapable.');
}