Skip to content

Commit 44cf0c6

Browse files
committed
Release 1.0.1
0 parents  commit 44cf0c6

File tree

96 files changed

+5903
-0
lines changed

Some content is hidden

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

96 files changed

+5903
-0
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Flutter CI
2+
3+
on: push
4+
5+
jobs:
6+
tests-linux:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: subosito/flutter-action@v2
12+
with:
13+
channel: 'stable'
14+
flutter-version: '3.3.2'
15+
- name: Install dependencies
16+
run: flutter pub get
17+
- name: Generate support files
18+
run: flutter pub run build_runner build --delete-conflicting-outputs
19+
- name: Run Linux Tests
20+
run: flutter test test/linux/disks_test.dart
21+
22+
tests-windows:
23+
runs-on: windows-latest
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: subosito/flutter-action@v2
28+
with:
29+
channel: 'stable'
30+
flutter-version: '3.3.2'
31+
- name: Install dependencies
32+
run: flutter pub get
33+
- name: Run Windows Tests
34+
run: flutter test test/windows/disks_test.dart
35+
36+
tests-macos:
37+
runs-on: macos-latest
38+
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: subosito/flutter-action@v2
42+
with:
43+
channel: 'stable'
44+
flutter-version: '3.3.2'
45+
architecture: x64
46+
- name: Install dependencies
47+
run: flutter pub get
48+
- name: Generate support files
49+
run: flutter pub run build_runner build --delete-conflicting-outputs
50+
- name: Run macOS Tests
51+
run: flutter test test/macos/disks_test.dart

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25+
/pubspec.lock
26+
**/doc/api/
27+
.dart_tool/
28+
.packages
29+
build/
30+
.fvm/
31+
!.fvm/fvm_config.json
32+
33+
*.g.dart
34+
*.gr.dart
35+
*.mocks.dart

.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
8+
channel: stable
9+
10+
project_type: plugin

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.1
2+
3+
* First release

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2022 Angelo Cassano
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Disks Desktop
2+
3+
<img align="center" src="https://raw.githubusercontent.com/AngeloAvv/disks/master/assets/disks_logo.png" width="350" alt="Disks logo" border="0">
4+
5+
Disks Desktop is Flutter desktop library able to retrieve the installed devices information
6+
7+
[![Pub](https://img.shields.io/pub/v/disks.svg)](https://pub.dev/packages/disks)
8+
![Flutter CI](https://github.com/AngeloAvv/disks/workflows/Flutter%20CI/badge.svg)
9+
[![Star on GitHub](https://img.shields.io/github/stars/AngeloAvv/disks.svg?style=flat&logo=github&colorB=deeppink&label=stars)](https://github.com/AngeloAvv/disks)
10+
[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)
11+
12+
If you want to support this project,
13+
14+
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/angeloavv)
15+
16+
17+
With Disks Desktop you can get access to disks' information like:
18+
* block size
19+
* bus type
20+
* bus version
21+
* description
22+
* device name
23+
* device path
24+
* logical block size
25+
* available mountpoints
26+
* disk size
27+
* partition table type
28+
* is in error
29+
* is a card
30+
* is read only
31+
* is removable
32+
* is scsi
33+
* is system
34+
* is uas
35+
* is usb
36+
* is virtual
37+
* is raw
38+
39+
### Installation
40+
41+
In general, put it under
42+
[dependencies](https://dart.dev/tools/pub/dependencies),
43+
in your [pubspec.yaml](https://dart.dev/tools/pub/pubspec):
44+
45+
```yaml
46+
dependencies:
47+
disks_desktop: ^1.0.1
48+
```
49+
50+
You can install packages from the command line:
51+
52+
```terminal
53+
flutter pub get
54+
```
55+
56+
or simply add it through the command line:
57+
58+
```terminal
59+
flutter pub add disks_desktop
60+
```
61+
62+
## Usage
63+
64+
To get the list of the available drives with their details, simply create an instance of a Disk Repository, and then invoke the query getter.
65+
66+
Example:
67+
```dart
68+
final repository = DiskRepository();
69+
final disks = await repository.query;
70+
```
71+
72+
You can also use it with a FutureBuilder:
73+
```dart
74+
FutureBuilder<List<Disk>>(
75+
future: DisksRepository().query,
76+
builder: (context, snapshot) => [...]
77+
),
78+
```
79+
80+
## License
81+
82+
Disks Desktop is available under the MIT license. See the LICENSE file for more info.
83+
drivelist.cpp, drivelist.hpp, list.cpp and list.hpp are available under the Apache 2.0 license and belongs to balena.io
84+
85+
## Additional information
86+
<a href="https://www.flaticon.com/free-icons/hard-disk" title="hard disk icons">Disks icon created by Freepik - Flaticon</a>

analysis_options.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
linter:
4+
5+
rules:
6+
7+
analyzer:
8+
errors:
9+
todo: warning
10+
missing_return: error
11+
dead_code: error
12+
invalid_annotation_target: ignore
13+
exclude:
14+
- "**/*.g.dart"
15+
- "**/*.gr.dart"

assets/disks_logo.png

38.5 KB
Loading

build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
targets:
2+
$default:
3+
sources:
4+
exclude:
5+
- example/**.dart
6+
- windows/**.dart

example/.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release

0 commit comments

Comments
 (0)