update method Null safety

dynamic update(
  1. {S? state}
)

use this method to move other screen or show popup

Implementation

update({S? state}) {
  _add(state: state);

  try {
    notifyListeners();
  } catch (_) {}
}