31 lines
567 B
Dart
31 lines
567 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Item {
|
|
bool isFolder;
|
|
Uri uri;
|
|
String name;
|
|
|
|
Item(this.isFolder, this.uri, this.name);
|
|
}
|
|
|
|
class Folder {
|
|
List<Item> items;
|
|
Uri self;
|
|
Uri parent;
|
|
|
|
Folder(this.items, this.self, this.parent);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Folder{items: $items, self: $self, parent: $parent}';
|
|
}
|
|
}
|
|
|
|
abstract class DataProvider {
|
|
final List<String> validSuffix = [".jpg", ".jpeg", ".png"];
|
|
|
|
Future<void> connect();
|
|
Future<Folder> listOfFiles({Uri? uri});
|
|
ImageProvider getImageProvider(Uri uri);
|
|
}
|