Skip to content

Commit

Permalink
fix some format
Browse files Browse the repository at this point in the history
  • Loading branch information
VNAPNIC committed Nov 26, 2020
1 parent 4db1b50 commit 5150466
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
12 changes: 0 additions & 12 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,6 @@ class DevicesListScreen extends StatefulWidget {
_DevicesListScreenState createState() => _DevicesListScreenState();
}

Future<String> _getId() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) {
// import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
} else {
var androidDeviceInfo = await deviceInfo.androidInfo;
return androidDeviceInfo.androidId; // unique ID on Android
}
}

class _DevicesListScreenState extends State<DevicesListScreen> {
List<Device> devices = [];
List<Device> connectedDevices = [];
Expand Down
8 changes: 5 additions & 3 deletions lib/src/nearby_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ class NearbyService {
/// In iOS, the framework uses infrastructure Wi-Fi networks, peer-to-peer Wi-Fi,
/// and Bluetooth personal area networks for the underlying transport.
/// param [serviceType] max length 15 character, need to be defined in Info.plist
///
/// <key>NSBonjourServices</key>
// <array>
// <string>_[serviceType]._tcp</string>
// </array>
/// <array>
/// <string>_[serviceType]._tcp</string>
/// </array>
///
/// param [deviceId] is unique, you should use the UDID for [deviceId]
/// param [strategy] Nearby Connections supports different Strategies for advertising and discovery. The best Strategy to use depends on the use case. only support android OS
Future init({
Expand Down

0 comments on commit 5150466

Please sign in to comment.