I have created a map by loading webmap containing secured traffic layer (item id: 'e5039444ef3c48b8a8fdc9227f9be7c1', same as in samples). Then, I've added simple feature layer created via url to 'map.oprationalLayers' list. This feature layer comes from samples also.
I have OAuth set up (I can verify that it works correctly). Also, I don't set 'ArcGISEnvironment.apiKey' variable.
I expect that auth challenge is raised, webmap is fully loaded, and feature layer is loaded also . Nevertheless, auth challenge is not triggered, I see only basemap (without traffic layer) and correctly loaded feature layer:

This can be reproduced using Authenticate with OAuth sample. Just remove apiKey in 'main.dart' and change 'onMapViewReady()' function to the following:
void onMapViewReady() {
// Create a map from a web map that has a secure layer (traffic).
final portalItem = PortalItem.withPortalAndItemId(
portal: Portal.arcGISOnline(connection: PortalConnection.authenticated),
itemId: 'e5039444ef3c48b8a8fdc9227f9be7c1',
);
final map = ArcGISMap.withItem(portalItem);
// Create a uri to a feature service.
final uri = Uri.parse(
'https://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0',
);
// Create a service feature table with the uri.
final serviceFeatureTables = ServiceFeatureTable.withUri(uri);
// Create a feature layer with the service feature table.
final serviceFeatureLayer = FeatureLayer.withFeatureTable(serviceFeatureTables);
// Add the feature layer to the map.
map.operationalLayers.add(serviceFeatureLayer);
// Set the map to map view controller.
_mapViewController.arcGISMap = map;
}
Could you please clarify how can I combine using webmap, feature layers and OAuth?
I am checking via iPhone 15 simulator w/ iOS 17.5. Haven't tried on Android ones.
ArcGIS Flutter SDK version is 200.6.