Skip to content

Commit c1c3578

Browse files
committed
first release
1 parent 856fd24 commit c1c3578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+12848
-30
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ migrate_working_dir/
2424
# Flutter/Dart/Pub related
2525
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
2626
/pubspec.lock
27-
**/doc/api/
27+
# **/doc/api/
2828
.dart_tool/
2929
build/

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## 0.0.1
22

3-
* TODO: Describe initial release.
3+
* Initial release

README.md

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ A Flutter package to view directories and files in a foldable tree structure. Th
1010
- **Custom Text Styles**: Style folder and file names using `TextStyle`.
1111
- **File Tap Handler**: Handle file taps to perform custom actions.
1212

13+
<img src="https://i.imgur.com/CIw6251.gif" alt="gif" width="210" height="390" style="padding-right:45px"/>
14+
<img src = "https://i.imgur.com/dKUlq8v.gif" alt="gif" width="210" height="390"/>
15+
1316
## Getting Started
1417

1518
To get started, add the `file_tree_view` package to your `pubspec.yaml` file:
@@ -33,13 +36,7 @@ class MyApp extends StatelessWidget {
3336
return MaterialApp(
3437
home: Scaffold(
3538
appBar: AppBar(title: Text('File Tree View')),
36-
body: DirectoryTreeViewer(
37-
rootPath: '/path/to/your/directory', // Specify the root directory path
38-
onFileTap: (file) {
39-
// Handle file tap action
40-
print('Tapped on file: ${file.path}');
41-
},
42-
),
39+
body: DirectoryTreeViewer(rootPath: '/path/to/your/directory'), // Specify the root directory path
4340
),
4441
);
4542
}
@@ -51,30 +48,46 @@ class MyApp extends StatelessWidget {
5148
```dart
5249
import 'package:file_tree_view/file_tree_view.dart';
5350
import 'package:flutter/material.dart';
51+
import 'package:file_icon/file_icon.dart';
5452
import 'package:flutter_svg/flutter_svg.dart';
5553
5654
void main() {
57-
runApp(MyApp());
55+
runApp(
56+
const MaterialApp(
57+
home: Home()
58+
));
5859
}
5960
60-
class MyApp extends StatelessWidget {
61+
class Home extends StatelessWidget {
62+
const Home({super.key});
63+
6164
@override
6265
Widget build(BuildContext context) {
63-
return MaterialApp(
64-
home: Scaffold(
65-
appBar: AppBar(title: Text('File Tree View')),
66-
body: DirectoryTreeViewer(
67-
rootPath: '/path/to/your/directory',
68-
folderClosedIcon:Icon(FontAwesomeIcons.folder),
69-
folderClosedIcon:SvgPicture.asset('assets/your_icon.svg'), //SVG,PNG and Icon() are supported
70-
fileIcon:Icon(Icons.insert_drive_file),
71-
onFileTap: (file) {
72-
print('Tapped on file: ${file.path}');
73-
},
66+
return Scaffold(
67+
backgroundColor: const Color(0xff181818),
68+
appBar: AppBar(
69+
backgroundColor: Colors.transparent,
70+
iconTheme: const IconThemeData(color: Colors.grey),
71+
),
72+
drawer: Drawer(
73+
backgroundColor: const Color(0xff2b2b2b),
74+
child: SingleChildScrollView(
75+
child: SizedBox(
76+
child: DirectoryTreeViewer(
77+
rootPath: '/home/athul/Projects/AndroidApps/apps/survey_app', //Adjust the root path to desired folder
78+
folderNameStyle: const TextStyle(color: Colors.grey),
79+
fileNameStyle: const TextStyle(color: Colors.grey),
80+
folderClosedicon: SvgPicture.asset('assets/folder.svg',height: 28,width: 28),
81+
folderOpenedicon: SvgPicture.asset('assets/open-file-folder.svg',height: 28,width: 28),
82+
fileIconBuilder: (extension)=>FileIcon(extension),
83+
),
84+
),
7485
),
7586
),
87+
body: const Center(child: Text("Example with custom icons",style: TextStyle(color: Colors.grey))),
7688
);
7789
}
7890
}
7991
92+
8093
```

doc/api/__404error.html

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
7+
<meta name="description" content="file_tree_view API docs, for the Dart programming language.">
8+
<title>file_tree_view - Dart API docs</title>
9+
10+
11+
12+
<link rel="preconnect" href="https://fonts.gstatic.com">
13+
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
14+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
15+
16+
<link rel="stylesheet" href="static-assets/github.css?v1">
17+
<link rel="stylesheet" href="static-assets/styles.css?v1">
18+
<link rel="icon" href="static-assets/favicon.png?v1">
19+
20+
21+
</head>
22+
23+
24+
<body data-base-href="" data-using-base-href="false" class="light-theme">
25+
26+
<div id="overlay-under-drawer"></div>
27+
28+
<header id="title">
29+
<span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
30+
<ol class="breadcrumbs gt-separated dark hidden-xs">
31+
<li><a href="https://github.com/AthulNoobie/file_tree_view">file_tree_view package</a></li>
32+
</ol>
33+
<div class="self-name">file_tree_view</div>
34+
<form class="search navbar-right" role="search">
35+
<input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
36+
</form>
37+
<div class="toggle" id="theme-button" title="Toggle brightness">
38+
<label for="theme">
39+
<input type="checkbox" id="theme" value="light-theme">
40+
<span id="dark-theme-button" class="material-symbols-outlined">
41+
dark_mode
42+
</span>
43+
<span id="light-theme-button" class="material-symbols-outlined">
44+
light_mode
45+
</span>
46+
</label>
47+
</div>
48+
</header>
49+
<main>
50+
51+
<div id="dartdoc-main-content" class="main-content">
52+
<h1>404: Something's gone wrong :-(</h1>
53+
54+
<section class="desc">
55+
<p>You've tried to visit a page that doesn't exist. Luckily this site
56+
has other <a href="index.html">pages</a>.</p>
57+
<p>If you were looking for something specific, try searching:
58+
<form class="search-body" role="search">
59+
<input type="text" id="search-body" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
60+
</form>
61+
</p>
62+
63+
</section>
64+
</div> <!-- /.main-content -->
65+
66+
<div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
67+
<!-- The search input and breadcrumbs below are only responsively visible at low resolutions. -->
68+
<header id="header-search-sidebar" class="hidden-l">
69+
<form class="search-sidebar" role="search">
70+
<input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
71+
</form>
72+
</header>
73+
74+
<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
75+
<li><a href="https://github.com/AthulNoobie/file_tree_view">file_tree_view package</a></li>
76+
</ol>
77+
78+
79+
<h5><span class="package-name">file_tree_view</span> <span class="package-kind">package</span></h5>
80+
<ol>
81+
<li class="section-title">Libraries</li>
82+
<li><a href="file_tree_view/file_tree_view-library.html">file_tree_view</a></li>
83+
</ol>
84+
85+
</div>
86+
87+
<div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
88+
</div>
89+
90+
</main>
91+
92+
<footer>
93+
<span class="no-break">
94+
file_tree_view
95+
0.0.1
96+
</span>
97+
98+
99+
</footer>
100+
101+
102+
103+
<script src="static-assets/highlight.pack.js?v1"></script>
104+
<script src="static-assets/docs.dart.js"></script>
105+
106+
107+
108+
</body>
109+
110+
</html>
111+

doc/api/categories.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<ol>
2+
3+
<li class="section-title"><a href="file_tree_view/DirectoryTreeStateNotifier-class.html#constructors">Constructors</a></li>
4+
<li><a href="file_tree_view/DirectoryTreeStateNotifier/DirectoryTreeStateNotifier.html">DirectoryTreeStateNotifier</a></li>
5+
6+
7+
8+
<li class="section-title inherited">
9+
<a href="file_tree_view/DirectoryTreeStateNotifier-class.html#instance-properties">Properties</a>
10+
</li>
11+
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
12+
<li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html">hasListeners</a></li>
13+
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
14+
15+
<li class="section-title"><a href="file_tree_view/DirectoryTreeStateNotifier-class.html#instance-methods">Methods</a></li>
16+
<li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html">addListener</a></li>
17+
<li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html">dispose</a></li>
18+
<li><a href="file_tree_view/DirectoryTreeStateNotifier/isUnfolded.html">isUnfolded</a></li>
19+
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
20+
<li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html">notifyListeners</a></li>
21+
<li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html">removeListener</a></li>
22+
<li><a href="file_tree_view/DirectoryTreeStateNotifier/toggleFolder.html">toggleFolder</a></li>
23+
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>
24+
25+
<li class="section-title inherited"><a href="file_tree_view/DirectoryTreeStateNotifier-class.html#operators">Operators</a></li>
26+
<li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>
27+
28+
29+
30+
31+
32+
33+
</ol>

0 commit comments

Comments
 (0)