Skip to content

Commit

Permalink
Rename _CodecEncoder and _CodecDecoder
Browse files Browse the repository at this point in the history
adhering to #13 (review)
  • Loading branch information
tiholic authored Jun 27, 2020
1 parent 237315e commit 2a49b96
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/codec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import 'package:flutter/services.dart';
import '../ably.dart';


/// a [_CodecEncoder] encodes custom type and converts it to a Map which will
/// a [_Encoder] encodes custom type and converts it to a Map which will
/// be passed on to platform side
typedef Map<String, dynamic> _CodecEncoder<T>(final T value);
typedef Map<String, dynamic> _Encoder<T>(final T value);

/// a [_CodecDecoder] decodes Map received from platform side and converts to
/// a [_Decoder] decodes Map received from platform side and converts to
/// to respective dart types
typedef T _CodecDecoder<T>(Map<String, dynamic> jsonMap);
typedef T _Decoder<T>(Map<String, dynamic> jsonMap);

/// A class to manage encoding/decoding by provided encoder/decoder functions.
class _CodecPair<T>{

final _CodecEncoder<T> _encoder;
final _CodecDecoder<T> _decoder;
final _Encoder<T> _encoder;
final _Decoder<T> _decoder;
_CodecPair(this._encoder, this._decoder);

/// Convert properties from an ably library object instance (dart) to Map.
Expand Down

0 comments on commit 2a49b96

Please sign in to comment.