QuillSimpleToolbar constructor

QuillSimpleToolbar({
  1. required QuillSimpleToolbarConfigurations? configurations,
  2. QuillController? controller,
  3. Key? key,
})

Implementation

factory QuillSimpleToolbar({
  required QuillSimpleToolbarConfigurations? configurations,
  QuillController? controller,
  Key? key,
}) {
  // ignore: deprecated_member_use_from_same_package
  controller ??= configurations?.controller;
  assert(controller != null,
      'controller required. Provide controller directly (preferred) or indirectly through configurations (not recommended - will be removed in future versions).');
  controller ??= QuillController(
      document: Document(),
      selection: const TextSelection.collapsed(offset: 0));
  //
  controller.toolbarConfigurations = configurations;
  //
  return QuillSimpleToolbar._(
    controller: controller,
    key: key,
  );
}