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

A pure Dart library for reading and writing CharacterBook file formats (.character, .race, .chax) and JSON.

example/main.dart

import 'dart:io';
import 'package:characterbook_file_formats/characterbook_file_formats.dart';

void main() async {
  // Чтение файла .character
  final characterFile = File('path/to/character.character');
  final character =
      await CharacterBookFileParser.readFile(characterFile) as Character;
  print('Character: ${character.name}');

  // Создание расы и сохранение
  final race = Race(
    id: 'race_001',
    name: 'Elf',
    description: 'Graceful and wise.',
    lastEdited: DateTime.now(),
  );
  final raceFile = File('elf.race');
  await CharacterBookFileParser.writeFile(raceFile, race);
}
0
likes
150
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A pure Dart library for reading and writing CharacterBook file formats (.character, .race, .chax) and JSON.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

collection, meta, path_provider, typed_data

More

Packages that depend on characterbook_file_formats