convert
3.1.2, released 2 years ago by dart.dev
Encoders and decoders for converting between different data representations.
What it does
Provides additional Sink, Codec, Decoder, and Encoder types that complement the dart:convert SDK library. It includes utilities for handling less-central conversion APIs and flexible versioning.
AI-written summary of version 3.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need additional codecs or converters beyond what dart:convert offers
- You are working with data representations like hex encoding or percent encoding
Skip it when
- Core dart:convert features are entirely sufficient for your data representation needs
Strengths
- Acts as an external counterpart to dart:convert for flexible versioning
- Provides useful utilities like AccumulatorSink and CodePage
Weaknesses
- Limited scope restricted to data conversions
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:convert/convert.dart';
void main() {
var encoded = hex.encode([0x01, 0x02, 0x03]);
print(encoded); // 010203
}Alternatives
Packages that do the same job and could replace convert.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - mime
Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
92Compare - conduit_codable
A library for encoding and decoding dynamic structured data like JSON and YAML into Dart objects.
66Compare
Works with
Packages commonly used together with convert: ones it builds on, ones built on it, and its own family.
- typed_dataconvert depends on itUtility functions and classes for easier work with dart:typed_data lists.
- testSame familyA full featured library for writing and running Dart tests across platforms.
- http_parserSame familyA platform-independent package for parsing and serializing HTTP formats.
- analyzerBuilt on convertPerforms static analysis of Dart code for tool integration and embedding.
- shelf_staticBuilt on convertServe static files over HTTP with the shelf package
- build_runnerBuilt on convertA build system for Dart code generation and modular compilation.
- pointycastleBuilt on convertA Dart library providing a wide range of cryptographic algorithms and primitives.
- dart_jsonwebtokenBuilt on convertA Dart library for creating, signing, decoding and verifying JSON Web Tokens (JWT).