populate method

dynamic populate(
  1. dynamic data
)

Populates class properties via data object. @param data Data object.

Implementation

dynamic populate(dynamic data) {
  if (data != null) {
    (data as Map<String, dynamic>).forEach((key, value) {
      switch (key) {
        case "createTime":
          createTime ??= value;
          return;
        case "updateTime":
          updateTime ??= value;
          return;
      }
    });
  }
}