Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class RemoteConfig
/// Returns all config values.
Map<String, RemoteConfigValue> getAll() {
// Return type is Map<Object?, Object?>
final map = remote_config_interop.getAll(jsObject).dartify()!
final map = remote_config_interop.getAll(jsObject)
as Map<Object?, Object?>;
// Cast the map to <String, Object?> to mirror expected return type: Record<string, Value>;
final castMap = map.cast<String, Object?>();
Expand All @@ -120,10 +120,10 @@ class RemoteConfig

RemoteConfigValue getValue(String key) => RemoteConfigValue(
utf8.encode(
remote_config_interop.getValue(jsObject, key.toJS).asString().toDart,
remote_config_interop.getValue(jsObject, key.toJS).asString(),
),
getSource(
remote_config_interop.getValue(jsObject, key.toJS).getSource().toDart,
remote_config_interop.getValue(jsObject, key.toJS).asString(),
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ library;
import 'dart:js_interop';

import 'package:firebase_core_web/firebase_core_web_interop.dart';
import 'package:firebase_remote_config_platform_interface/firebase_remote_config_platform_interface.dart';

@JS()
@staticInterop
Expand All @@ -33,7 +34,7 @@ external JSPromise fetchConfig(RemoteConfigJsImpl remoteConfig);

@JS()
@staticInterop
external JSAny getAll(RemoteConfigJsImpl remoteConfig);
external Map<String, RemoteConfigValue> getAll(RemoteConfigJsImpl remoteConfig);

@JS()
@staticInterop
Expand All @@ -49,7 +50,7 @@ external JSString getString(RemoteConfigJsImpl remoteConfig, JSString key);

@JS()
@staticInterop
external ValueJsImpl getValue(RemoteConfigJsImpl remoteConfig, JSString key);
external RemoteConfigValue getValue(RemoteConfigJsImpl remoteConfig, JSString key);

@JS()
@staticInterop
Expand Down
Loading