We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c24958 commit 999a228Copy full SHA for 999a228
patterns/strategy/print_strategy/main.dart
patterns/strategy/view_strategy/main.dart
@@ -0,0 +1,19 @@
1
+import 'pattern/byte_context.dart';
2
+import 'strategies/hex_view_strategy.dart';
3
+import 'strategies/str_view_strategy.dart';
4
+import 'strategies/zip_view_strategy.dart';
5
+
6
+void main() {
7
+ final byteList = ByteContext()
8
+ ..add('Hello guru')
9
+ ..add(123456789)
10
+ ..add(3.1456564984);
11
12
+ final strFormat = byteList.toStringView(StrViewStrategy());
13
+ final hexFormat = byteList.toStringView(HexViewStrategy());
14
+ final zipFormat = byteList.toStringView(ZipViewStrategy());
15
16
+ print(strFormat);
17
+ print(hexFormat);
18
+ print(zipFormat);
19
+}
0 commit comments