Skip to content

Commit

Permalink
add rfw_txt example
Browse files Browse the repository at this point in the history
  • Loading branch information
ebwood committed Mar 15, 2024
1 parent fa3c9b0 commit 43c61ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/rfw_txt/example/rfw2txt_example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'dart:io';

import 'package:rfw_txt/src/rfw2txt.dart';

void main() {
File rfwFile = File('../data/test1.rfw');
String txt = rfw2txt(rfwFile.readAsBytesSync());
print(txt);
Map<String, dynamic> jsonData = rfw2json(rfwFile.readAsBytesSync());
print(jsonData);
}
11 changes: 11 additions & 0 deletions packages/rfw_txt/example/txt2rfw_example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:rfw_txt/src/txt2rfw.dart';


void main() {
File file = File('../data/test1.rfwtxt');
Uint8List bytes = txt2rfw(file.readAsStringSync());
print(bytes);
}

0 comments on commit 43c61ce

Please sign in to comment.