Disable camera option by default on desktop

pull/1507/head
Ellet 1 year ago
parent c532fb4de9
commit eea58c6634
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 2
      example/macos/Runner/DebugProfile.entitlements
  2. 4
      example/macos/Runner/Release.entitlements
  3. 2
      flutter_quill_extensions/lib/presentation/embeds/toolbar/image_button/select_image_source.dart
  4. 2
      flutter_quill_extensions/lib/presentation/embeds/toolbar/video_button/select_video_source.dart

@ -10,5 +10,7 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>

@ -4,5 +4,9 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/extensions.dart' show isDesktop;
import '../../embed_types/image.dart';
@ -27,6 +28,7 @@ class SelectImageSourceDialog extends StatelessWidget {
'Take a photo using your phone camera',
),
leading: const Icon(Icons.camera),
enabled: !isDesktop(),
onTap: () => Navigator.of(context).pop(InsertImageSource.camera),
),
ListTile(

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/extensions.dart' show isDesktop;
import '../../embed_types/video.dart';
@ -27,6 +28,7 @@ class SelectVideoSourceDialog extends StatelessWidget {
'Record a video using your phone camera',
),
leading: const Icon(Icons.camera),
enabled: !isDesktop(),
onTap: () => Navigator.of(context).pop(InsertVideoSource.camera),
),
ListTile(

Loading…
Cancel
Save