Enable extension in profile builds

This commit is contained in:
Simon Binder 2023-11-22 12:40:33 +01:00
parent 340462e379
commit 4c3b12855d
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 3 additions and 4 deletions

View File

@ -13,11 +13,10 @@ import 'service_extension.dart';
import 'shared.dart';
const _releaseMode = bool.fromEnvironment('dart.vm.product');
const _profileMode = bool.fromEnvironment('dart.vm.profile');
// Avoid pulling in a bunch of unused code to describe databases and to make
// them available through service extensions on release builds.
const _enable = !_releaseMode && !_profileMode;
// This code is only used for the Drift DevTools extension. Avoid including it
// in release builds.
const _enable = !_releaseMode;
void postEvent(String type, Map<Object?, Object?> data) {
developer.postEvent('drift:$type', data);