onWrite method

  1. @override
Future<bool> onWrite(
  1. WriterFractal f
)
override

Implementation

@override
onWrite(f) async {
  switch (f.attr) {
    case 'color':
      var hex = '#${int.parse(f.content).toRadixString(16).substring(2)}';
      color = Color.hex(hex);
  }

  return await super.onWrite(f);
}