diff --git a/lib/main_staging.dart b/lib/main_staging.dart index 3c9523d9b..19624011f 100644 --- a/lib/main_staging.dart +++ b/lib/main_staging.dart @@ -1,7 +1,6 @@ -// ignore_for_file: avoid_web_libraries_in_flutter - import 'dart:async'; -import 'dart:js' as js; +import 'dart:js_interop' as js; +import 'dart:js_interop_unsafe'; import 'package:api_client/api_client.dart'; import 'package:authentication_repository/authentication_repository.dart'; @@ -18,8 +17,10 @@ import 'package:leaderboard_repository/leaderboard_repository.dart'; void main() async { if (kDebugMode) { - js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] = - const String.fromEnvironment('APPCHECK_DEBUG_TOKEN'); + js.globalContext.setProperty( + 'FIREBASE_APPCHECK_DEBUG_TOKEN'.toJS, + const String.fromEnvironment('APPCHECK_DEBUG_TOKEN').toJS, + ); } WidgetsFlutterBinding.ensureInitialized();