service.dart 575 B

123456789101112131415
  1. import 'package:flowy_editor/service/selection_service.dart';
  2. import 'package:flutter/material.dart';
  3. class FlowyService {
  4. // selection service
  5. final selectionServiceKey = GlobalKey(debugLabel: 'flowy_selection_service');
  6. FlowySelectionService get selectionService {
  7. assert(selectionServiceKey.currentState != null &&
  8. selectionServiceKey.currentState is FlowySelectionService);
  9. return selectionServiceKey.currentState! as FlowySelectionService;
  10. }
  11. // keyboard service
  12. final keyboardServiceKey = GlobalKey(debugLabel: 'flowy_keyboard_service');
  13. }