phonecallstate 0.0.1 copy "phonecallstate: ^0.0.1" to clipboard
phonecallstate: ^0.0.1 copied to clipboard

outdatedDart 1 only

Flutter plugin to receive Phone Call State for both iOS and Android.

phonecallstate #

Flutter plugin to receive Phone Call State for both iOS and Android.

enum PhonecallState { incoming, dialing, connected, disconnected, none }
enum PhonecallStateError { notimplementedyet  }

...
  Phonecallstate  phonecallstate;
  PhonecallState phonecallstatus;

...

phonecallstate = new Phonecallstate();
    phonecallstatus = PhonecallState.none;


    phonecallstate.setIncomingHandler(() {
      setState(() {
        phonecallstatus = PhonecallState.incoming;
        phonecallstatuslog =  phonecallstatuslog.toString() + PhonecallState.incoming.toString()+"\n";
      });
    });

    phonecallstate.setDialingHandler(() {
      setState(() {
        phonecallstatus = PhonecallState.dialing;
        phonecallstatuslog =  phonecallstatuslog.toString() + PhonecallState.dialing.toString()+"\n";
      });
    });

    phonecallstate.setConnectedHandler(() {
      setState(() {
        phonecallstatus = PhonecallState.connected;
        phonecallstatuslog =  phonecallstatuslog.toString() + PhonecallState.connected.toString()+"\n";
      });
    });

    phonecallstate.setDisconnectedHandler(() {
      setState(() {
        phonecallstatus = PhonecallState.disconnected;
        phonecallstatuslog =  phonecallstatuslog.toString() + PhonecallState.disconnected.toString()+"\n";
      });
    });

    phonecallstate.setErrorHandler((msg) {

    });
    ```
3
likes
30
pub points
12%
popularity

Publisher

unverified uploader

Flutter plugin to receive Phone Call State for both iOS and Android.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on phonecallstate