diene_dart_lib 1.0.0
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');
}