dispose method

  1. @override
void dispose()
override

Releases everything this controller owns. The page that created the controller calls this from its own State.dispose(); a subclass that adds its own controllers overrides this and ends with super.dispose().

Both the text controllers and the URx fields are ChangeNotifiers, so without this every page visit leaves its listeners behind.

Implementation

@override
void dispose() {
  titleFilter.dispose();
  nationalCodeFilter.dispose();
  phoneNumberFilter.dispose();
  zipCodeFilter.dispose();
  landlineFilter.dispose();
  merchantIdFilter.dispose();
  bankAccountIdFilter.dispose();
  fromCreatedController.dispose();
  toCreatedController.dispose();
  super.dispose();
}