merge method

Future<Map<String, dynamic>> merge(
  1. Map<String, dynamic> newData
)

Implementation

Future<Map<String, dynamic>> merge(Map<String, dynamic> newData) async {
  Map<String, dynamic> result = newData;

  Map<String, dynamic> oldData = await onMerge();

  oldData.forEach((key, value) {
    result[key] = value;
  });

  return result;
}