### Static Analysis Issue Report Source: https://pub.dev/packages/propertylistserialization/score Examples of static analysis warnings regarding HTML-like angle brackets in documentation comments. ```text ╷ 116 │ /// Float32, double, Map, List, DateTime, bool or ByteData. │ ^^^^^^^^^^^^^^^^ ╵ ``` ```text ╷ 139 │ /// Float32, double, Map, List, DateTime, bool or ByteData. │ ^^^^^^^^^^^^^^^^ ╵ ``` -------------------------------- ### Add dependency via command line Source: https://pub.dev/packages/propertylistserialization/install Use these commands to add the package to your project using the Dart or Flutter CLI. ```bash $ dart pub add propertylistserialization ``` ```bash $ flutter pub add propertylistserialization ``` -------------------------------- ### Binary plist output format Source: https://pub.dev/packages/propertylistserialization The raw byte representation of the serialized binary plist. ```text 62 70 6c 69 73 74 30 30 a1 01 d3 02 03 04 05 06 07 58 49 63 6f 6e 4e 61 6d 65 58 49 63 6f 6e 53 69 7a 65 58 53 65 6c 65 63 74 65 64 5d 6c 61 72 67 65 49 63 6f 6e 2e 70 6e 67 10 20 09 08 0a 11 1a 23 2c 3a 3c 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d ``` -------------------------------- ### Import the library Source: https://pub.dev/packages/propertylistserialization/install Include this import statement in your Dart files to access the library functionality. ```dart import 'package:propertylistserialization/propertylistserialization.dart'; ``` -------------------------------- ### Serialize and Deserialize Property Lists in Dart Source: https://pub.dev/packages/propertylistserialization/example Demonstrates converting Dart collections to XML and binary plist formats and back again using the PropertyListSerialization class. ```dart // example.dart // PropertyListSerialization Copyright © 2021; Electric Bolt Limited. import 'dart:typed_data'; import 'package:convert/convert.dart'; import 'package:propertylistserialization/propertylistserialization.dart'; void main() { // xml - serialize final list1 = []; final dict1 = {}; dict1['Selected'] = true; dict1['IconName'] = 'largeIcon.png'; dict1['IconSize'] = 32; list1.add(dict1); final xml = PropertyListSerialization.stringWithPropertyList(list1); print('**xml**\n$xml'); // xml - deserialize final list2 = PropertyListSerialization.propertyListWithString(xml) as List; final dict2 = list2[0] as Map; final selected2 = dict2['Selected']; final iconName2 = dict2['IconName']; final iconSize2 = dict2['IconSize']; print('$selected2 $iconName2 $iconSize2'); // binary - serialize final bin = PropertyListSerialization.dataWithPropertyList(list2); print('**binary**\n${hex.encoder.convert(Uint8List.sublistView(bin))}'); // binary - deserialize final list3 = PropertyListSerialization.propertyListWithData(bin) as List; final dict3 = list3[0] as Map; final selected3 = dict3['Selected']; final iconName3 = dict3['IconName']; final iconSize3 = dict3['IconSize']; print('$selected3 $iconName3 $iconSize3'); } ``` -------------------------------- ### XML plist output format Source: https://pub.dev/packages/propertylistserialization The resulting XML structure generated by the serialization process. ```xml IconName largeIcon.png IconSize 32 Selected ``` -------------------------------- ### dataWithPropertyList(Object obj) Source: https://pub.dev/packages/propertylistserialization Serializes a Dart object graph into a binary property list. ```APIDOC ## static ByteData dataWithPropertyList(Object obj) ### Description Returns a property list as a binary ByteData object for the provided object graph. ### Parameters - **obj** (Object) - Required - The object graph to write out as a binary property list. Supported types: String, int, Float32, double, Map, List, DateTime, bool, or ByteData. ### Returns - **ByteData** - The binary plist representation. ### Throws - **PropertyListWriteStreamException** - If the object graph is incompatible. ``` -------------------------------- ### Serializing to XML plist Source: https://pub.dev/packages/propertylistserialization Convert a Dart object tree into an XML-formatted plist string. ```dart var list = []; var dict = {}; dict['Selected'] = true; dict['IconName'] = 'largeIcon.png'; dict['IconSize'] = 32; list.add(dict); try { var result = PropertyListSerialization.stringWithPropertyList(list); // result == String } on PropertyListWriteStreamException catch (e) { // handle error. } ``` -------------------------------- ### propertyListWithData(ByteData data, {bool keyedArchive}) Source: https://pub.dev/packages/propertylistserialization Deserializes a binary property list into a Dart object graph. ```APIDOC ## static Object propertyListWithData(ByteData data, {bool keyedArchive = false}) ### Description Creates and returns an object graph from the specified property list binary ByteData. ### Parameters - **data** (ByteData) - Required - The binary plist data. - **keyedArchive** (bool) - Optional - If true, deserialization supports CF$UID constructs and returns them as a UID object. ### Returns - **Object** - Returns one of String, int, double, Map, List, DateTime, bool, ByteData, or UID. ### Throws - **PropertyListReadStreamException** - If the plist is corrupt, values could not be converted, or the input stream is EOF. ``` -------------------------------- ### Serializing to binary plist Source: https://pub.dev/packages/propertylistserialization Convert a Dart object tree into a binary-formatted ByteData object. ```dart var list = []; var dict = {}; dict['Selected'] = true; dict['IconName'] = 'largeIcon.png'; dict['IconSize'] = 32; list.add(dict); try { var result = PropertyListSerialization.dataWithPropertyList(list); // result == ByteData } on PropertyListWriteStreamException catch (e) { // handle error. } ``` -------------------------------- ### Serialize to Binary ByteData Source: https://pub.dev/packages/propertylistserialization Converts a Dart object graph into a binary property list format. ```dart static ByteData dataWithPropertyList(Object obj); ``` -------------------------------- ### stringWithPropertyList(Object obj) Source: https://pub.dev/packages/propertylistserialization Serializes a Dart object graph into an XML property list string. ```APIDOC ## static String stringWithPropertyList(Object obj) ### Description Returns a property list as an XML string for the provided object graph. ### Parameters - **obj** (Object) - Required - The object graph to write out as an XML property list. Supported types: String, int, Float32, double, Map, List, DateTime, bool, or ByteData. ### Returns - **String** - The XML plist representation. ### Throws - **PropertyListWriteStreamException** - If the object graph is incompatible. ``` -------------------------------- ### Deserializing from binary plist Source: https://pub.dev/packages/propertylistserialization Parse binary plist data back into Dart objects. ```dart try { var list = PropertyListSerialization.propertyListWithData(result) as List; var dict = list[0]; var selected = dict['Selected']; var iconName = dict['IconName']; var iconSize = dict['IconSize']; } on PropertyListReadStreamException catch (e) { // handle error. } ``` -------------------------------- ### Add dependency to pubspec.yaml Source: https://pub.dev/packages/propertylistserialization/install Manually add the package version to the dependencies section of your pubspec.yaml file. ```yaml dependencies: propertylistserialization: ^1.5.0 ``` -------------------------------- ### Serialize to XML String Source: https://pub.dev/packages/propertylistserialization Converts a Dart object graph into an XML property list string. ```dart static String stringWithPropertyList(Object obj); ``` -------------------------------- ### propertyListWithString(String string) Source: https://pub.dev/packages/propertylistserialization Deserializes an XML property list string into a Dart object graph. ```APIDOC ## static Object propertyListWithString(String string) ### Description Creates and returns an object graph from the specified property list XML string. ### Parameters - **string** (String) - Required - The XML plist string. ### Returns - **Object** - Returns one of String, int, double, Map, List, DateTime, bool, or ByteData. ### Throws - **PropertyListReadStreamException** - If the plist is corrupt, values could not be converted, or the input stream is EOF. ``` -------------------------------- ### Deserialize from Binary ByteData Source: https://pub.dev/packages/propertylistserialization Parses binary property list data into a Dart object graph, with optional support for keyed archives. ```dart static Object propertyListWithData(ByteData data, {bool keyedArchive = false}); ``` -------------------------------- ### Deserializing from XML plist Source: https://pub.dev/packages/propertylistserialization Parse an XML plist string back into Dart objects. ```dart try { var list = PropertyListSerialization.propertyListWithString(result) as List; var dict = list[0]; var selected = dict['Selected']; // true var iconName = dict['IconName']; // largeIcon.png var iconSize = dict['IconSize']; // 32 } on PropertyListReadStreamException catch (e) { // handle error. } ``` -------------------------------- ### Deserialize from XML String Source: https://pub.dev/packages/propertylistserialization Parses an XML property list string into a Dart object graph. ```dart static Object propertyListWithString(String string); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.