Skip to content

Commit 0bc7a18

Browse files
2 parents 78bb6d4 + 4f2db2e commit 0bc7a18

1 file changed

Lines changed: 26 additions & 10 deletions

File tree

README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NetShare
22
Data sharing in local network
33

4-
<img width="772" alt="Screenshot 2023-01-11 at 21 39 25" src="https://user-images.githubusercontent.com/29337364/211834507-cd29722b-53ce-40f0-9ef5-350138406773.png">
4+
<img width="772" alt="Screenshot 2023-01-11 at 21 39 25" src="https://github.com/huynguyennovem/netshare/assets/29337364/0a4ab95b-1fd8-4f30-97f2-43e3805894f2">
55

66
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/blueaquilae.svg?style=social&label=Follow%20HuyNguyenTw)](https://twitter.com/HuyNguyenTw)
77

@@ -24,27 +24,43 @@ https://github.com/huynguyennovem/netshare/assets/29337364/2e9caa89-d05a-48f5-ae
2424
## How to build the project
2525
_Note: This project is mainly running on the latest Flutter beta channel_
2626

27-
1. Run Hive object generator (if needed)
28-
The project's using (hive)[https://pub.dev/packages/hive] (NoSQL Database) to cache object data. Before running this, we should generate all entities adapters (being inside `.g.dart` files) to make sure all they are updated:
27+
1. Run the project as usual
2928

3029
```bash
31-
flutter pub run build_runner build --delete-conflicting-outputs
30+
flutter run -d <target-platforms>
3231
```
3332

34-
2. Run the project as usual
33+
`<target-platforms>` is all supported Flutter platforms, except Web.
3534

36-
```bash
37-
flutter run
38-
```
3935

4036
Normally, desktop app (macOS, Windows, Linux) will be server and mobile app (Android, iOS) will be client role. But roles can be reversed, let's try and enjoy :)
4137

38+
## How to use the app
39+
40+
1. Build and open app on your target platform as above
41+
42+
For instance, I want to share files between Macbook and Android, so I will build and run app for these platforms. Or you can use released binary files in [Releases](https://github.com/huynguyennovem/netshare/releases) without building the project.
43+
44+
2. Connect
45+
46+
- On Macbook (assume the role of server):
47+
- Enter the current machine's IP address and port (In 1st time, it will automatically get IP and auto-filled it. Next time, it will use the cached previous connected address).
48+
- Enter/paste/pick directory location where the files will be hosted.
49+
- Click on `Start hosting` button
50+
- On Android/iOS (assume the role of client):
51+
- You have two options:
52+
- `Scan to connect` to scan the address with QR Code generated by server app (on Mac above)
53+
- `Manual connect` to enter address yourself
54+
- After filling IP/port, press `Connect` button and enjoy it
55+
4256
**Note**
4357
- Remember to connect both server and client app in the same network
4458
- iOS:
4559
To keep iOS app persisting on your device, recommend running it in release mode: `flutter run --release` (you can not reopen app if running it in debug mode)
46-
47-
60+
- Run Hive object generator (only when [hive](https://pub.dev/packages/hive) (NoSQL Database) has some major changes or the project lacks `.g.dart` files). By default, all `.g.dart` files are committed to the repository so you don't need to re-generate again.
61+
```bash
62+
flutter pub run build_runner build --delete-conflicting-outputs
63+
```
4864

4965

5066

0 commit comments

Comments
 (0)