c2c_flutter_call_kit 0.1.2+1 copy "c2c_flutter_call_kit: ^0.1.2+1" to clipboard
c2c_flutter_call_kit: ^0.1.2+1 copied to clipboard

PlatformAndroid

A Flutter plugin for displaying call screen when app in background or terminated.

example/lib/main.dart

import 'package:c2c_flutter_call_kit/connectycube_flutter_call_kit.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    ConnectycubeFlutterCallKit.instance.init(
      onCallAccepted: _onCallAccepted,
      onCallRejected: _onCallRejected,
    );
    ConnectycubeFlutterCallKit.showCallNotification(
      mettingId: 'mettingId',
      uuid: 'uuid',
      callType: 1,
      callerId: 123,
      callerName: 'callerName',
      callerAvatar: 'callerAvatar',
      opponentsIds: {123},);

    ConnectycubeFlutterCallKit.reportCallAccepted(uuid: '1234');
    ConnectycubeFlutterCallKit.reportCallEnded(uuid: '1234');
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }

  Future _onCallAccepted(String mettingId,
      String uuid,
      int callType,
      int callerId,
      String callerName,
      String callerAvatar,
      Set<int> opponentsIds,
      Map<String, String> userInfo) {}

  Future _onCallRejected(String mettingId,
      String uuid,
      int callType,
      int callerId,
      String callerName,
      String callerAvatar,
      Set<int> opponentsIds,
      Map<String, String> userInfo) {}
}
4
likes
130
pub points
0%
popularity

Publisher

unverified uploader

A Flutter plugin for displaying call screen when app in background or terminated.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on c2c_flutter_call_kit