message.dart 736 Bytes
Newer Older
1 2 3 4
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5 6 7
/// An object sent from the Flutter Driver to a Flutter application to instruct
/// the application to perform a task.
abstract class Command {
8 9
  /// Identifies the type of the command object and of the handler.
  String get kind;
10 11 12

  /// Serializes this command to parameter name/value pairs.
  Map<String, String> serialize();
13 14
}

15
/// An object sent from a Flutter application back to the Flutter Driver in
16
/// response to a command.
Ian Hickson's avatar
Ian Hickson committed
17
abstract class Result { // ignore: one_member_abstracts
18 19 20
  /// Serializes this message to a JSON map.
  Map<String, dynamic> toJson();
}