Skip to content

Commit d7f83ab

Browse files
committed
provisioning refactoring
1 parent 9729629 commit d7f83ab

File tree

7 files changed

+386
-95
lines changed

7 files changed

+386
-95
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import 'package:freezed_annotation/freezed_annotation.dart';
3+
4+
// required: associates our `main.dart` with the code generated by Freezed
5+
part 'wifi_network.freezed.dart';
6+
// optional: Since our Person class is serializable, we must add this line.
7+
// But if Person was not serializable, we could skip it.
8+
part 'wifi_network.g.dart';
9+
10+
@freezed
11+
class WifiNetwork with _$WifiNetwork {
12+
factory WifiNetwork({
13+
required String ssid,
14+
required int rssi,
15+
required int channel,
16+
// required Uint8List bssid,
17+
required String auth,
18+
@Default('') String password,
19+
}) = _WifiNetwork;
20+
21+
factory WifiNetwork.fromJson(Map<String, Object?> json) => _$WifiNetworkFromJson(json);
22+
}

lib/modules/device/provisioning/models/wifi_network.freezed.dart

Lines changed: 243 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/modules/device/provisioning/models/wifi_network.g.dart

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)