anchor.diff:  abstract class PasteFromClipboardStrategy {
     factory PasteFromClipboardStrategy() {
       return (browserEngine == BrowserEngine.firefox ||
  -            html.window.navigator.clipboard.readText == null)
  +            html.window.navigator.clipboard?.readText == null)
           ? ExecCommandPasteStrategy()
           : ClipboardAPIPasteStrategy();
     }
  
positive.code: /// APIs and the browser.
  abstract class CopyToClipboardStrategy {
    factory CopyToClipboardStrategy() {
      return (html.window.navigator.clipboard.writeText != null)
          ? ClipboardAPICopyStrategy()
          : ExecCommandCopyStrategy();
    }
  
negative.code: class ExecCommandCopyStrategy implements CopyToClipboardStrategy {
    @override
    void setData(String text) {
      // Copy content to clipboard with execCommand.
      // See: https://developers.google.com/web/updates/2015/04/cut-and-copy-commands
      final html.TextAreaElement tempTextArea = _appendTemporaryTextArea();
      tempTextArea.value = text;
      tempTextArea.focus();
      tempTextArea.select();
      try {
        final bool result = html.document.execCommand('copy');
        if (!result) {
          print('copy is not successful');
        }
      } catch (e) {
        print('copy is not successful ${e.message}');
      } finally {
        _removeTemporaryTextArea(tempTextArea);
      }
    }
  
    html.TextAreaElement _appendTemporaryTextArea() {
      final html.TextAreaElement tempElement = html.TextAreaElement();
      final html.CssStyleDeclaration elementStyle = tempElement.style;
      elementStyle
        ..position = 'absolute'
        ..top = '-99999px'
        ..left = '-99999px'
        ..opacity = '0'
        ..color = 'transparent'
        ..backgroundColor = 'transparent'
        ..background = 'transparent';
  
      html.document.body.append(tempElement);
  
      return tempElement;
    }
  
    void _removeTemporaryTextArea(html.HtmlElement element) {
      element?.remove();
    }
  }
  
  