diene_dart_lib 1.0.0 copy "diene_dart_lib: ^1.0.0" to clipboard
diene_dart_lib: ^1.0.0 copied to clipboard

A generic pure-Dart library template — a Note value type with a JSON wire codec and a pure summariser, ready to retokenize into a real package.

example/diene_dart_lib_example.dart

import 'package:diene_dart_lib/diene_dart_lib.dart';

/// Demonstrates the clean consumer path: build a [Note], summarise it, and
/// round-trip it through the JSON wire codec via the public barrel alone.
void main() {
  const Note note = Note(
    title: 'Release',
    body: 'Ship the pure-Dart template.',
  );

  final String summary = summarizeNote(note);
  assert(
    summary == 'Release — Ship the pure-Dart template.',
    'the summariser joins the title and body',
  );

  final Note roundTripped = Note.fromJson(note.toJson());
  assert(roundTripped == note, 'the wire codec round-trips');
}
0
likes
160
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A generic pure-Dart library template — a Note value type with a JSON wire codec and a pure summariser, ready to retokenize into a real package.

Repository (GitHub)
View/report issues

Topics

#template #library #sample #json #codec

License

MIT (license)

More

Packages that depend on diene_dart_lib