log_board.dart 819 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import 'package:flutter/material.dart';
  2. import 'package:vnote_device_plugin/events/event_center.dart';
  3. class LogBoard extends StatefulWidget {
  4. @override
  5. State<StatefulWidget> createState() => _LogBoardState();
  6. }
  7. class _LogBoardState extends State<LogBoard> {
  8. late final DeviceEventListener _listener;
  9. @override
  10. void initState() {
  11. _listener = DeviceEventListener(
  12. accpetStatusList: null,
  13. callback: _onEventCallback,
  14. );
  15. DeviceEventCenter.instance.addListener(_listener);
  16. super.initState();
  17. }
  18. @override
  19. void dispose() {
  20. DeviceEventCenter.instance.removeListener(_listener);
  21. super.dispose();
  22. }
  23. void _onEventCallback(status, data) {
  24. //
  25. }
  26. @override
  27. Widget build(BuildContext context) {
  28. // TODO: implement build
  29. throw UnimplementedError();
  30. }
  31. }