disabled_usage.dart 1.06 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 21 22 23 24 25 26 27 28 29

class DisabledUsage implements Usage {
  @override
  bool get isFirstRun => false;

  @override
  bool get suppressAnalytics => true;

  @override
  set suppressAnalytics(bool value) { }

  @override
  bool get enabled => false;

  @override
  set enabled(bool value) { }

  @override
  String get clientId => null;

  @override
  void sendCommand(String command, { Map<String, String> parameters }) { }

  @override
30 31 32 33 34 35 36
  void sendEvent(
    String category,
    String parameter, {
    String label,
    int value,
    Map<String, String> parameters,
  }) { }
37 38 39 40 41

  @override
  void sendTiming(String category, String variableName, Duration duration, { String label }) { }

  @override
42
  void sendException(dynamic exception) { }
43 44 45 46 47

  @override
  Stream<Map<String, dynamic>> get onSend => null;

  @override
48
  Future<void> ensureAnalyticsSent() => Future<void>.value();
49 50 51 52

  @override
  void printWelcome() { }
}