File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,12 @@ process.
6060
6161The extension [ ` Reader ` ] [ Reader ] provides a systematic method of
6262retrieving constants of
63- arbitrary data-types by allowing users to register ` Decoder ` objects.
63+ arbitrary data-types by allowing users to register [ ` Decoder ` ] [ Decoder ] objects.
64+ To create custom decoder extend [ ` Decoder<T> ` ] [ Decoder ] and override the
65+ the method ` T read<T>(DartObject obj) ` . This method
66+ attempts to read a variable of type ` T ` from the compile-time constant
67+ ` obj ` and returns the result.
6468
65- ` Decoder<T> ` is an abstract
66- parameterized class with a method ` T read<T>(DartObject obj) `
67- that attempt to read a variable of type ` T ` from ` obj ` and return the result.
6869The example below demonstrates how to create a custom decoder for the
6970sample class ` Annotation ` and register an instance of the decoder with
7071the extension [ ` Reader ` ] [ Reader ] .
You can’t perform that action at this time.
0 commit comments