canUpdate method
Whether this page can be updated with the other
page.
Two pages are consider updatable if they have same the runtimeType and key.
Implementation
@override
bool canUpdate(Page<dynamic> other) {
return other.runtimeType == runtimeType &&
(other as StackedPage).routeKey == routeKey;
}