shareEnabled property

  1. @override
bool get shareEnabled
override

Whether share is enabled.

Implementation

@override
bool get shareEnabled {
  switch (defaultTargetPlatform) {
    case TargetPlatform.android:
    case TargetPlatform.iOS:
      return !widget.obscureText
          && !textEditingValue.selection.isCollapsed
          && textEditingValue.selection.textInside(textEditingValue.text).trim() != '';
    case TargetPlatform.macOS:
    case TargetPlatform.fuchsia:
    case TargetPlatform.linux:
    case TargetPlatform.windows:
      return false;
  }
}