box method
Using boxServe-class for to construct this info-box.
Implementation
void box(String caller) {
buf.writeln(':da:box:start: C:$caller 123456789-23456789-23456789');
print('-->>-->>-- :da:box:start: C:$caller -->>-->>-- ');
// use: boxServe OR create own class here
// devl:LIB set min-max values for row / width.
final int _sw = 198; // screen width.
final int _rc = 37; // row count.
String boxHeader = ':da:box:';
print('-->>-->> $boxHeader boxServe start -->>-->>-- ');
boxServe.init(_rc, _sw, '_'); // rows, width or: 0 = use default 47, 195
boxServe.construct(':da:box: ', ':da:box: ');
/// Method cascades would make this look nicer.
boxServe.aHeader(1, 4, '* * States * * ');
/// row, column, list-items, width.
boxServe.aBox(2, 5, 6, 16, tl.mapToListB(st));
boxServe.aHeader(1, 60, ' * DAWO APP INFO *');
boxServe.aBox(2, 22, 4, 7, ['name:', 'Version:', 'By:', 'User:']);
boxServe.aBox(2, 30, 4, 48, ['$name', '$version', '$by', '$user']);
/// devl:LIB Bring real data.
boxServe.aBox(2, 48, 4, 60, ['Info', 'Motto:']);
boxServe.aBox(2, 48, 5, 60, [info, motto]);
String bufSize = buf.length.toString();
boxServe.aHeader(7, 7, 'Buffer: size: $bufSize');
// List 10 items, 38 width. howTo:split handy split = toList -method.
boxServe.aBox(8, 6, 10, 38, buf.toString().split('\n'));
String appBufSize = appBuf.length.toString();
boxServe.aHeader(20, 7, 'appBuffer: size: $appBufSize');
// List 10 items, 38 width. Note handy split = toList -method.
boxServe.aBox(21, 6, 10, 38, appBuf.toString().split('\n'));
/// out. default Buffers and their sizes.
Map<String, String> outBufMapShow = Map();
outBufMapShow = outBuffersInfoMap('here', 'here again');
String _s;
_s = outBufMapShow.length.toString();
boxServe.aHeader(23, 7, 'outBuffer: size: $_s');
// List 10 items, 38 width. howTo:split handy split = toList -method.
boxServe.aBox(24, 6, 10, 38, tl.mapToFineList(outBufMapShow, 20, 12));
boxServe.vertLine(8, 5, 28); // phases
boxServe.aHeader(2, 117, '* say *');
boxServe.aBox(3, 117, 9, 70, tl.mapToFineList(say, 8, 60));
boxServe.aHeader(4, 50, '* Parts *');
boxServe.aBox(5, 50, 5, 30, tl.mapToList(part));
boxServe.aHeader(4, 83, '* Plans: *');
boxServe.aBox(5, 83, 4, 28, tl.mapToFineList(plan, 6, 25));
boxServe.aHeader(12, 50, '* Clients. Examples *');
boxServe.aBox(13, 50, 5, 63, tl.mapToFineList(client, 12, 46));
boxServe.vertLine(2, 49, 16); // parts plans clients
List<String> boxLogL = [];
/// dBox shows Map for: boxes done INIT, CONSTRUCT, sGLB, SHOW, DONE -info.
for (var x in boxServe.logM.keys) {
boxLogL.add(boxServe.logM[x].toString());
}
boxServe.aHeader(20, 140, '* Box users. init construct show done *');
boxServe.aBox(21, 140, 12, 55, boxLogL);
/// At the end print some vertical lines.
boxServe.vertLine(13, 117, 23); // right middle
boxServe.vertLine(13, 139, 23); // right+ middle+
boxServe.aHeader(13, 120, '* Actions *');
/// 'print' makes this visible in screen. Margin: 4.
///
boxServe.show(boxHeader, 'print', 4);
boxServe.done(boxHeader);
print('--<<--<< $boxHeader boxServe done --<<--<<-- ');
}