typed_data
1.4.0, released 2 years ago by dart.dev
Utility functions and classes for easier work with dart:typed_data lists.
What it does
Provides helper classes like TypedDataBuffer and typed queues that wrap typed arrays with list‑like APIs. Adds methods for efficient insertion, concatenation, and sub‑listing of typed data.
AI-written summary of version 1.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need list‑like structures backed by typed arrays for performance.
- You want typed‑data‑aware buffers or queues without writing low‑level code.
Skip it when
- You only work with regular Dart collections and don't need typed‑array optimizations.
- You require high‑level abstractions like state management or networking.
Strengths
- Zero‑dependency utilities for typed data.
- Performance‑focused implementations for buffers and queues.
- Fully null‑safe and works on all Dart platforms.
Weaknesses
- Limited to typed‑data helpers; no broader functionality.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:typed_data/typed_data.dart';
void main() {
final buffer = TypedDataBuffer<int>(Int32List(0));
buffer.addAll([1, 2, 3]);
print(buffer); // [1, 2, 3]
}Alternatives
Packages that do the same job and could replace typed_data.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - weak_map
A map whose keys are weakly held, and cache functions for memoization.
80Compare - fast_immutable_collections
Fast immutable lists, sets, maps, and multimaps for Dart
91Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare
Works with
Packages commonly used together with typed_data: ones it builds on, ones built on it, and its own family.
- built_valueSame familyImmutable value types with builders, enum classes and JSON serialization for Dart.
- asyncSame familyUtility classes and helpers that extend Dart's async library.
- hooksSame familyDart API for the JSON-based protocol for package build and link hooks.
- code_assetsSame familyProvides the hook protocol specification for bundling native code with Dart packages.
- fake_asyncSame familyFake asynchronous events like timers and microtasks for deterministic testing.
- jniSame familyProvides Dart/Flutter bindings to call native Java code via JNI.
- objective_cSame familySupport library for accessing Objective C via ffigen in Flutter
- mockitoSame familyA mock framework inspired by Mockito with APIs for Fakes, Mocks, behavior verification, and stubbing.