filesystem_picker
filesystem_picker copied to clipboard
always show parant button `..`
show .. in rootDirectory

@mabDc What is the purpose? What should happen when the ".." in the root is pressed?
i'm confused for that in you plugin sometimes show .. when button rootName is pressed and sometimes not,
@mabDc Please provide screenshots of these situations.
@andyduke


https://user-images.githubusercontent.com/19526331/115011843-aea7e100-9ee1-11eb-8a44-b135369dbbe1.mp4
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:filesystem_picker/filesystem_picker.dart';
import 'package:path_provider/path_provider.dart';
void main() {
runApp(MaterialApp(home: Material(child: FHome())));
}
class FHome extends StatefulWidget {
FHome({Key key}) : super(key: key);
@override
_FHomeState createState() => _FHomeState();
}
class _FHomeState extends State<FHome> {
Map<String, Directory> map;
@override
void initState() {
map = {};
init();
super.initState();
}
init() async {
map = {
"ApplicationDocuments": await getApplicationDocumentsDirectory(),
/// change here to another exist path
r"C:\Users\mo\Documents\eso\font\": Directory(r"C:\Users\mo\Documents\eso\font\"),
};
setState(() {});
}
buildOne(String name, Directory d) {
return ListTile(
title: Text(name),
onTap: () => FilesystemPicker.open(
title: 'Save to folder',
context: context,
rootDirectory: d,
rootName: d.path,
fsType: FilesystemType.file,
allowedExtensions: [".testfornothing"],
pickText: 'Save file to this folder',
folderIconColor: Colors.teal,
fileTileSelectMode: FileTileSelectMode.wholeTile,
),
);
}
@override
Widget build(BuildContext context) {
return ListView(
children: [
for (var k in map.keys) buildOne(k, map[k]),
],
);
}
}
@mabDc Thank you. I'll see what the problem is.
@mabDc Try to specify the path C:\Users\mo\Documents\eso\font\ without a trailing slash, like this: C:\Users\mo\Documents\eso\font
what is the difference between them
@mabDc This will help identify the problem. I don't have access to Flutter for Windows right now.

this is useful ui in desktop with Name Modified editable path .. button like 7zip
@andyduke