Skip to content

Commit

Permalink
Web fix (#381)
Browse files Browse the repository at this point in the history
* Fix context menu problems on web

* Oh sh*t forgot kIsWeb check
  • Loading branch information
larsb24 committed Sep 10, 2023
1 parent 4deb6e9 commit 60a09bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.
*/

import 'package:dahlia_shared/dahlia_shared.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import "package:intl/locale.dart" as intl;
Expand Down Expand Up @@ -61,7 +62,7 @@ Future<void> main() async {
],
builder: (context, loaded, child) {
if (!loaded) return const ColoredBox(color: Colors.black);
BrowserContextMenu.disableContextMenu();
if (kIsWeb) BrowserContextMenu.disableContextMenu();

return ListenableServiceBuilder<CustomizationService>(
builder: (context, child) {
Expand Down

0 comments on commit 60a09bc

Please sign in to comment.