Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update devtools dependencies #891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
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