whiteboard_sdk_flutter 0.3.0 copy "whiteboard_sdk_flutter: ^0.3.0" to clipboard
whiteboard_sdk_flutter: ^0.3.0 copied to clipboard

retractedoutdated

A Flutter wrapper for netless whiteboard

Agora Whiteboard SDK #

A Flutter Plugin of Agora Whiteboard SDK

Installation #

Add whiteboard_sdk_flutter to your pubspec:

dependencies:
  whiteboard_sdk_flutter: ^0.3.0

Android #

Configure your app to use the INTERNET permission in the manifest file located in:
<project root>/android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

Sample Usage #

Live Room #

  1. Init whiteboard using WhiteSdkOptions, WhiteSdk can be fetch on onSdkCreated
  2. call WhiteSdk.joinRoom using RoomOptions to fetch a WhiteRoom
  3. WhiteRoom is a controller to Live-Whiteboard
Widget build(BuildContext context) {
    return new WhiteboardView(
        options: WhiteOptions(
            appIdentifier: APP_ID,
            log: true,
            backgroundColor: Color(0xFFF9F4E7),
        ),
        onSdkCreated: (sdk) async {
            // use sdk to join room
            var room = await sdk.joinRoom(
                options: RoomOptions(
                    uuid: ROOM_UUID,
                    roomToken: ROOM_TOKEN,
                    uid: APP_UNIQUE_UID,
                    isWritable: true,
                ),
            );

            setState(() {
                whiteSdk = sdk;
                whiteRoom = room;
            });
        },
    );
}

Replay #

  1. Init whiteboard using WhiteSdkOptions, WhiteSdk can be fetch on onSdkCreated
  2. call WhiteSdk.joinReplay using ReplayOptions to fetch WhiteReplay
  3. WhiteReplay is a controller to Record-Whitebarod
Widget build(BuildContext context) {
    return new WhiteboardView(
        options: WhiteOptions(
            appIdentifier: APP_ID,
            log: true,
            backgroundColor: Color(0xFFF9F4E7),
        ),
        onSdkCreated: (whiteSdk) async {
            // use sdk to join replay
            var replay = await sdk.joinReplay(
              options: ReplayOptions(room: ROOM_UUID, roomToken: ROOM_TOKEN),
              onPlayerStateChanged: _onPlayerStateChanged,
              onPlayerPhaseChanged: _onPlayerPhaseChanged,
              onScheduleTimeChanged: _onScheduleTimeChanged,
            );

            setState(() {
              whiteSdk = sdk;
              whiteReplay = replay;
            });
          },
    );
}

Example #

See the example/ folder for a working example app.

Common apis can be found in the examples/

Room

Replay

Contributor #

Thanks To liuhong1happy for the first version of flutter whiteboard.

6
likes
0
pub points
59%
popularity

Publisher

unverified uploader

A Flutter wrapper for netless whiteboard

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_inappwebview, webview_flutter

More

Packages that depend on whiteboard_sdk_flutter