Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[file_selector] Replace locally defined XFile type with cross_file package #3286

Merged
merged 1 commit into from Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,3 +1,7 @@
## 1.0.2

* Replace locally defined `XFile` types with the versions from the [cross_file](https://pub.dev/packages/cross_file) package.

## 1.0.1

* Allow type groups that allow any file.
Expand Down
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:cross_file/cross_file.dart';
import 'package:flutter/services.dart';

import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
Expand Down
Expand Up @@ -4,6 +4,7 @@

import 'dart:async';

import 'package:cross_file/cross_file.dart';
import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

Expand Down
@@ -1,3 +1,2 @@
export 'x_file/x_file.dart';

export 'package:cross_file/cross_file.dart';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reexport cross_file from here, or should we ask app users to depend on cross_file themselves? How would this behave if we have multiple plugins that use cross_file? WDYT @stuartmorgan?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forcing users to manually depend on another package that is required for using this one seems problematic. I don't know what happens if two different packages export the same third package though. Presumably it just means it's accessible via both namespaces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably it just means it's accessible via both namespaces?

Yeah, I think you're right, we can leave this here as a convenience.

export 'x_type_group/x_type_group.dart';

This file was deleted.

This file was deleted.

This file was deleted.