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
_Note: This project is mainly running on the latest Flutter beta channel_
26
26
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
29
28
30
29
```bash
31
-
flutter pub run build_runner build --delete-conflicting-outputs
30
+
flutter run -d <target-platforms>
32
31
```
33
32
34
-
2. Run the project as usual
33
+
`<target-platforms>` is all supported Flutter platforms, except Web.
35
34
36
-
```bash
37
-
flutter run
38
-
```
39
35
40
36
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 :)
41
37
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
+
42
56
**Note**
43
57
- Remember to connect both server and client app in the same network
44
58
- iOS:
45
59
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
0 commit comments