SIGN IN SIGN UP

Do not inject 'type' and 'method' into service extension responses (#190946)

## Description

This PR simplifies `BindingBase.registerServiceExtension` by removing
the synthetic injection of `result['type'] = '_extensionType'` and
`result['method'] = method`.

### Background
- `result['type'] = '_extensionType'` was introduced in 2016 (PR #3397)
to match early Observatory conventions where all response objects had a
`type` field.
- The VM Service protocol and `dart:developer.ServiceExtensionResponse`
do not require `type` or `method`.
- Injected keys clobbered legitimate `type` or `method` entries in
extension responses and required mutating the returned map.
- Standard clients (`flutter_tools`, DevTools, IDE plugins) parse
specific payload properties (`value`, `enabled`, diagnostics JSON)
rather than `_extensionType` or `method`.

## Related Issues
None

## Tests
- Verified all existing framework foundation tests
(`service_extensions_test.dart`, etc.) and `flutter_tools` daemon tests
pass.
B
Ben Konyi committed
6ce8fc4006ada6660b983d095436cf44187dfdef
Parent: dcc19d4
Committed by GitHub <noreply@github.com> on 8/20/2026, 7:02:13 PM