12345678910111213141516171819202122232425262728293031323334353637 |
- import 'package:flutter/material.dart';
- import 'package:vnote_device_plugin/events/event_center.dart';
- class LogBoard extends StatefulWidget {
- @override
- State<StatefulWidget> createState() => _LogBoardState();
- }
- class _LogBoardState extends State<LogBoard> {
- late final DeviceEventListener _listener;
- @override
- void initState() {
- _listener = DeviceEventListener(
- accpetStatusList: null,
- callback: _onEventCallback,
- );
- DeviceEventCenter.instance.addListener(_listener);
- super.initState();
- }
- @override
- void dispose() {
- DeviceEventCenter.instance.removeListener(_listener);
- super.dispose();
- }
- void _onEventCallback(status, data) {
- //
- }
- @override
- Widget build(BuildContext context) {
- // TODO: implement build
- throw UnimplementedError();
- }
- }
|