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

PlatformAndroidiOS
outdated

A Flutter plugin that support Agora Interactive Whiteboard on Android and iOS.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:whiteboard_sdk_flutter_example/white_example_page.dart';
import 'package:whiteboard_sdk_flutter_example/window_test_page.dart';

import 'replay_test_page.dart';
import 'room_test_page.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Whiteboard',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'White Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SizedBox(
                width: 200,
                height: 50,
                child: ElevatedButton(
                  onPressed: () => _pushPage(context, allPages[0]),
                  child: Text("Room"),
                )),
            SizedBox(height: 40),
            SizedBox(
                width: 200,
                height: 50,
                child: ElevatedButton(
                  onPressed: () => _pushPage(context, allPages[1]),
                  child: Text("Replay"),
                )),
            SizedBox(height: 40),
            SizedBox(
                width: 200,
                height: 50,
                child: ElevatedButton(
                  onPressed: () => _pushPage(context, allPages[2]),
                  child: Text("Window"),
                )),
          ],
        ),
      ),
    );
  }

  void _pushPage(BuildContext context, WhiteExamplePage page) {
    Navigator.of(context).push(MaterialPageRoute<void>(
        builder: (_) => Scaffold(
              appBar: AppBar(title: Text(page.title)),
              body: page,
            )));
  }
}

final List<WhiteExamplePage> allPages = <WhiteExamplePage>[
  RoomTestPage(),
  ReplayTestPage(),
  WindowTestPage(),
];
6
likes
140
pub points
58%
popularity

Publisher

unverified uploader

A Flutter plugin that support Agora Interactive Whiteboard on Android and iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, webview_flutter

More

Packages that depend on whiteboard_sdk_flutter