Skip to content

Commit

Permalink
update devtools dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameri11 committed Oct 5, 2024
1 parent 6474578 commit d843013
Show file tree
Hide file tree
Showing 20 changed files with 1,295 additions and 1,325 deletions.
12 changes: 11 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
},
{
"name": "DevTools Extension Tests (Chrome)",
"request": "launch",
"type": "dart",
"program": "packages/provider_devtools_extension/test",
"args": [
"--platform",
"chrome"
]
},
]
}
1 change: 1 addition & 0 deletions packages/provider/extension/devtools/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ name: provider
issueTracker: https://github.com/rrousselGit/provider/issues
version: 0.0.1
materialIconCodePoint: "0xe0b1"
requiresConnection: true
3 changes: 3 additions & 0 deletions packages/provider_devtools_extension/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Ignore failure screenshots created by golden tests
test/failures
12 changes: 6 additions & 6 deletions packages/provider_devtools_extension/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "972d36c4efeee7e3bb16c050fd233389625a6470"
channel: "[user-branch]"
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470
base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- platform: web
create_revision: 972d36c4efeee7e3bb16c050fd233389625a6470
base_revision: 972d36c4efeee7e3bb16c050fd233389625a6470
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730

# User provided section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,26 @@ import 'package:flutter/foundation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:vm_service/vm_service.dart';

Stream<VmService> get _serviceConnectionStream =>
_serviceConnectionStreamController.stream;
final _serviceConnectionStreamController =
StreamController<VmService>.broadcast();
void setServiceConnectionForProviderScreen(VmService service) {
_serviceConnectionStreamController.add(service);
}

/// Exposes the current VmServiceWrapper.
/// By listening to this provider instead of directly accessing `serviceManager.service`,
/// this ensures that providers reload properly when the devtool is connected
/// to a different application.
final serviceProvider = StreamProvider<VmService>((ref) async* {
yield serviceManager.service!;
yield* _serviceConnectionStream;
final serviceProvider = StreamProvider<VmService>((ref) {
final controller = StreamController<VmService>.broadcast();
void handleConnectionChange() {
final isConnected = serviceManager.connectedState.value.connected;
final isServiceAvailable = serviceManager.isServiceAvailable;
if (isConnected && isServiceAvailable) {
controller.add(serviceManager.service!);
}
}

serviceManager.connectedState.addListener(handleConnectionChange);

handleConnectionChange();

ref.onDispose(() {
serviceManager.connectedState.removeListener(handleConnectionChange);
controller.close();
});

return controller.stream;
});

/// An [EvalOnDartLibrary] that has access to no specific library in particular
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:collection/collection.dart';
import 'package:devtools_app_shared/service.dart';
import 'package:flutter/foundation.dart';
import 'package:vm_service/vm_service.dart';

import 'fake_freezed_annotation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'result.dart';

// This part is generated using `package:freezed`, but without the devtool depending
// on the package.
// To update the generated files, temporarily add freezed/freezed_annotation/build_runner
// as dependencies; replace the `fake_freezed_annotation.dart` import with the
// real annotation package, then execute `pub run build_runner build`.
part 'instance_details.freezed.dart';

typedef Setter = Future<void> Function(String newValue);
Expand Down
Loading

0 comments on commit d843013

Please sign in to comment.