init method
Future<bool>
init(
- String name,
- String code,
- VoidCallback? callback,
- VoidCallback? errorback, {
- String q = '',
- String f = '',
- String o = '',
- int p = 1,
- int r = 20,
- int s = 0,
Implementation
Future<bool> init(
String name,
String code,
VoidCallback? callback,
VoidCallback? errorback, {
String q = '',
String f = '',
String o = '',
int p = 1,
int r = 20,
int s = 0,
}) async {
bool isDone = false;
_head = BrowseHead(code: code, rows: {});
name = name;
code = code;
_callback = callback;
_errorback = errorback;
_head!.controller = ScrollController();
//_head!.controller.removeListener(() {});
_head!.controller.addListener(_scrollListener);
_head!.newSvc.init(_head!.code, '00000000-0000-0000-0000-000000000000');
if (r == 0) r = 20;
if (_head != null && _head!.rows.length == 0) {
isDone = await fetchData(q: q, f: f, p: p, r: r, o: o, s: s);
}
return isDone;
}