showScreenPage method

dynamic showScreenPage(
  1. dynamic actionData,
  2. dynamic context
)

Implementation

showScreenPage(actionData, context) {
  myLog('showScreenPage actinData is $actionData');

  for (int i = 0; i < actionData.length; i++) {
    if (isNull(actionData[i])) {
      continue;
    }
    int backcolor = _defaultBackGroundColor;
    if (!isNull(actionData[i][gsBackgroundColor])) {
      backcolor = actionData[i][gsBackgroundColor];
    }
    Map<dynamic, dynamic> ai = actionData[i];
    dynamic name = '';
    dynamic type = '';
    dynamic data;
    for (var element in ai.entries) {
      if (element.key == gName) {
        name = element.value;
      } else if (element.key == gType) {
        type = element.value;
      } else if (element.key == gItems) {
        data = element.value;
      }
    }

    Map map = getMap(data);
    _screenLists[name] = Map.fromEntries(map.entries.toList()
      ..sort((e1, e2) => getInt(e1.key) - getInt(e2.key)));

    if (type == gScreen) {
      if (name == gFirstPage) {
        //_firstFormName = name;

        _firstPage = const FirstPage();
      } else {
        /*if (name == gLogin) {
          clear(context);
        }*/
        showMyDetail(_screenLists[name], context, backcolor);
      }
    } else {
      showScreenPageOne(name, context, backcolor, map);
    }
  }

  myNotifyListeners();
}