diff --git a/packages/file_selector/file_selector_platform_interface/lib/src/web_helpers/web_helpers.dart b/packages/file_selector/file_selector_platform_interface/lib/src/web_helpers/web_helpers.dart deleted file mode 100644 index 2fecc4c6d4a..00000000000 --- a/packages/file_selector/file_selector_platform_interface/lib/src/web_helpers/web_helpers.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:html'; - -/// Create anchor element with download attribute -AnchorElement createAnchorElement(String href, String? suggestedName) { - final AnchorElement element = AnchorElement(href: href); - - if (suggestedName == null) { - element.download = 'download'; - } else { - element.download = suggestedName; - } - - return element; -} - -/// Add an element to a container and click it -void addElementToContainerAndClick(Element container, Element element) { - // Add the element and click it - // All previous elements will be removed before adding the new one - container.children.add(element); - element.click(); -} - -/// Initializes a DOM container where we can host elements. -Element ensureInitialized(String id) { - Element? target = querySelector('#$id'); - if (target == null) { - final Element targetElement = Element.tag('flt-x-file')..id = id; - - querySelector('body')!.children.add(targetElement); - target = targetElement; - } - return target; -}