Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/view/widgets/channel_parameters_widget.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -249,7 +252,9 @@ class _ChannelParametersState extends State<ChannelParametersWidget> {
groupValue:
oscilloscopeStateProvider.isInBuiltMICSelected,
onChanged: (bool? value) async {
await Permission.microphone.request();
if (!kIsWeb && !Platform.isMacOS) {
await Permission.microphone.request();
}
setState(
() {
if (value == null) {
Expand Down
2 changes: 2 additions & 0 deletions macos/Runner/DebugProfile.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
<string>NSApplication</string>
<key>NSLocationUsageDescription</key>
<string>This app needs access to location.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to microphone for oscilloscope.</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions macos/Runner/Release.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
</dict>
</plist>
Loading