Skip to content

Instantly share code, notes, and snippets.

Last active Sep 3, 2021
What would you like to do?
import 'dart:convert';
class Meta {
Map<String, dynamic> _backing;
dynamic get(String key) => _backing[key];
void insert(Map<String, dynamic> data) => _backing = {..._backing,};
Meta set(String key, dynamic value) {
_backing[key] = value;
return this;
void clear() => _backing = {};
String toJson() => json.encode(_backing);
Meta(): _backing = {};
factory Meta.fromJson(String str) {
final meta = Meta();
return meta;
operator [](String key) => _backing[key];
operator []=(String key, dynamic value) => _backing[key] = value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment