onModelChange method

  1. @override
dynamic onModelChange(
  1. WidgetModel model, {
  2. String? property,
  3. dynamic value,
})
override

Callback function for when the model changes, used to force a rebuild with setState()

Implementation

@override
onModelChange(WidgetModel model, {String? property, dynamic value}) {
  try {
    Binding? b = Binding.fromString(property);
    if ((b?.property == 'visible') ||
        (b?.property == 'height') ||
        (b?.property == 'minheight') ||
        (b?.property == 'maxheight')) notifyListeners(property, value);
  } catch (e) {
    Log().exception(e, caller: 'Framework.View');
  }
}