disabled_usage.dart 1.05 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
part of reporting;
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

class DisabledUsage implements Usage {
  @override
  bool get suppressAnalytics => true;

  @override
  set suppressAnalytics(bool value) { }

  @override
  bool get enabled => false;

  @override
  set enabled(bool value) { }

  @override
21
  String get clientId => '';
22 23

  @override
24
  void sendCommand(String command, { CustomDimensions? parameters }) { }
25 26

  @override
27 28 29
  void sendEvent(
    String category,
    String parameter, {
30 31
    String? label,
    int? value,
32
    CustomDimensions? parameters,
33
  }) { }
34 35

  @override
36
  void sendTiming(String category, String variableName, Duration duration, { String? label }) { }
37 38

  @override
39
  void sendException(dynamic exception) { }
40 41

  @override
42
  Stream<Map<String, dynamic>> get onSend => const Stream<Map<String, dynamic>>.empty();
43 44

  @override
45
  Future<void> ensureAnalyticsSent() => Future<void>.value();
46 47 48 49

  @override
  void printWelcome() { }
}