Add macOS support (#23)
* Add macOS support * Update README * Update to v0.2.0 * Document breaking changes * Delete widget tests
This commit is contained in:
@@ -46,8 +46,8 @@ class DevicePreview extends StatelessWidget {
|
||||
final status = Text(
|
||||
device.byPlatform(
|
||||
onAny: (d) => d.status.name,
|
||||
onIOS: (d) =>
|
||||
context.select<AppService, bool>((v) => v.isIOSBrowser)
|
||||
onDarwin: (d) =>
|
||||
context.select<AppService, bool>((v) => v.isDarwinBrowser)
|
||||
? "Peer found | ${d.status.name}"
|
||||
: "Pending invitation | ${d.status.name}",
|
||||
) ??
|
||||
|
||||
@@ -53,10 +53,10 @@ class InfoPanel extends StatelessWidget {
|
||||
label: 'Communication channel state',
|
||||
value: service.communicationChannelState.previewName,
|
||||
),
|
||||
if (Platform.isIOS)
|
||||
if (Platform.isIOS || Platform.isMacOS)
|
||||
_InfoChip(
|
||||
label: 'Role',
|
||||
value: service.isIOSBrowser
|
||||
value: service.isDarwinBrowser
|
||||
? 'You are going to find your friend'
|
||||
: 'You are waiting for another user to connect',
|
||||
),
|
||||
@@ -94,7 +94,8 @@ class AdditionalInfoPanel extends StatelessWidget {
|
||||
label: 'Model',
|
||||
value: service.platformModel,
|
||||
),
|
||||
if (service.currentDeviceInfo != null && Platform.isIOS)
|
||||
if (service.currentDeviceInfo != null &&
|
||||
(Platform.isIOS || Platform.isMacOS))
|
||||
_InfoChip(
|
||||
label: 'Device P2P ID',
|
||||
value: service.currentDeviceInfo!.id,
|
||||
|
||||
Reference in New Issue
Block a user