import 'dart:async';

import 'package:flutter/material.dart';
import 'package:guru_utils/controller/lifecycle_controller.dart';
import 'package:injectable/injectable.dart';

import 'editor_design_model.dart';

/// Created by Haoyi on 2022/8/20

@injectable
class EditorController extends LifecycleController {
  final EditorDesignSpec designModel = EditorDesignSpec.get();
  Completer? loading;

  EditorDialogDesignSpec get dialogDesignModel => designModel.dialogSpec;

  final FocusNode focusNode = FocusNode();
  final TextEditingController editorController = TextEditingController();

  String get text => editorController.text;

  EditorController();

  @override
  void onClose() {
    super.onClose();
  }
}
