getImageStyleString function

String getImageStyleString(
  1. QuillController controller
)

Implementation

String getImageStyleString(QuillController controller) {
  final String? s = controller
      .getAllSelectionStyles()
      .firstWhere((s) => s.attributes.containsKey(Attribute.style.key), orElse: () => Style())
      .attributes[Attribute.style.key]
      ?.value;
  return s ?? '';
}