You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-25Lines changed: 29 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
# File Manager
2
2
3
-
<imgsrc="https://i.imgur.com/NNaUK60.png"></img>
3
+

4
4
5
-

5
+

*The complete example is available [here](https://github.com/DevsOnFlutter/file_manager/blob/main/example/lib/main.dart).*
63
63
64
64
Required parameter for **FileManager** are `controller` and `builder`
65
+
65
66
* `controller` The controller updates value and notifies its listeners, and FileManager updates itself appropriately whenever the user modifies the path or changes the sort-type with an associated FileManagerController.
66
-
```
67
+
68
+
```dart
67
69
final FileManagerController controller = FileManagerController();
68
70
```
69
-
* `builder` This function allows you to create custom widgets and retrieve a list of entities `List<FileSystemEntity>.`
70
71
72
+
*`builder` This function allows you to create custom widgets and retrieve a list of entities `List<FileSystemEntity>.`
71
73
74
+
## Sample code
72
75
73
-
Sample code
74
76
```dart
75
77
FileManager(
76
78
controller: controller,
@@ -100,7 +102,10 @@ FileManager(
100
102
),
101
103
```
102
104
105
+
</hr>
106
+
103
107
## FileManager
108
+
104
109
| Properties | Description |
105
110
|--------------|-----------------|
106
111
|`loadingScreen`| For the loading screen, create a custom widget. A simple Centered CircularProgressIndicator is provided by default. |
@@ -110,6 +115,7 @@ FileManager(
110
115
|`builder`| This function allows you to create custom widgets and retrieve a list of entities `List<FileSystemEntity>.`|
111
116
112
117
## FileManagerContoller
118
+
113
119
| Properties | Description |
114
120
|--------------|-----------------|
115
121
|`getSortedBy`| The sorting type that is currently in use is returned. |
@@ -121,11 +127,13 @@ FileManager(
121
127
|`openDirectory`| Open directory by providing `Directory`. |
122
128
123
129
## Others
130
+
124
131
| Properties | Description |
125
132
|--------------|-----------------|
126
133
|`isFile`| check weather FileSystemEntity is File. |
127
134
|`isDirectory`| check weather FileSystemEntity is Directory. |
128
-
|`basename`| Get the basename of Directory or File. Provide `File`, `Directory` or `FileSystemEntity` and returns the name as a `String`. If you want to hide the extension of a file, you may use optional parameter `showFileExtension`. ie ```controller.dirName(dir, true)```|
135
+
| `basename` | Get the basename of Directory or File. Provide `File`, `Directory` or `FileSystemEntity` and returns the name as a `String`. If you want to hide the extension of a file, you may use optional parameter `showFileExtension`. ie ```controller.dirName(dir, true)```
136
+
|
129
137
|`formatBytes`| Convert bytes to human readable size.[getCurrentDirectory]. |
130
138
|`setCurrentPath`| Set current directory path by providing `String` of path, similar to [openDirectory]. `List<FileSystemEntity>.`|
131
139
|`getStorageList`| Get list of available storage in the device, returns an empty list if there is no storage `List<Directory>`|
0 commit comments