Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always show parant button .. #18

Open
mabDc opened this issue Apr 8, 2021 · 9 comments
Open

always show parant button .. #18

mabDc opened this issue Apr 8, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@mabDc
Copy link

mabDc commented Apr 8, 2021

show .. in rootDirectory
%YE{RTPZ}7SPN66$R_9(`LT

@andyduke
Copy link
Owner

andyduke commented Apr 8, 2021

@mabDc What is the purpose? What should happen when the ".." in the root is pressed?

@mabDc
Copy link
Author

mabDc commented Apr 11, 2021

i'm confused for that in you plugin sometimes show .. when button rootName is pressed and sometimes not,

@andyduke
Copy link
Owner

@mabDc Please provide screenshots of these situations.

@mabDc
Copy link
Author

mabDc commented Apr 16, 2021

@andyduke

image

image

test_for_filepicker.2021-04-16.18-26-21_x264.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]),
      ],
    );
  }
}

@andyduke
Copy link
Owner

@mabDc Thank you. I'll see what the problem is.

@andyduke
Copy link
Owner

@mabDc Try to specify the path C:\Users\mo\Documents\eso\font\ without a trailing slash, like this: C:\Users\mo\Documents\eso\font

@mabDc
Copy link
Author

mabDc commented Apr 16, 2021

what is the difference between them

@andyduke
Copy link
Owner

@mabDc This will help identify the problem. I don't have access to Flutter for Windows right now.

@andyduke andyduke added the bug Something isn't working label Oct 31, 2021
@mabDc
Copy link
Author

mabDc commented Feb 17, 2022

E L8ASSI1NBY1BXO%VTU}39

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

@andyduke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants