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

retractedoutdated

A Flutter wrapper for netless whiteboard

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:whitebaord/playback_test_page.dart';

import 'room_test_page.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'WhiteSDK Demo'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  String testPage;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: testPage == null
            ? _buildPickView()
            : testPage == "room"
                ? RoomTestPage()
                : PlaybackTestPage());
  }

  Widget _buildPickView() {
    return Column(
      children: [
        Expanded(flex: 1, child: Container()),
        SizedBox(
            width: 200,
            height: 50,
            child: ElevatedButton(onPressed: _onPressRoom, child: Text("房间测试"))),
        SizedBox(height: 40),
        SizedBox(
            width: 200,
            height: 50,
            child: ElevatedButton(onPressed: _onPressPlayback, child: Text("回放测试"))),
        Expanded(flex: 1, child: Container()),
      ],
    );
  }

  void _onPressRoom() => setState(() {
        testPage = "room";
      });

  void _onPressPlayback() => setState(() {
        testPage = "playback";
      });
}
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