Image for post
Image for post
Just missed the train, wait for the next one to continue.

Don’t put view != null checks in your Presenters

Presenter method called directly from View

Image for post
Image for post

How can we remove this lint warning?

It’s always a bad sign when the else branch is missing.

Fail fast, don’t swallow errors and run in unexpected states

Call View async from Presenter

Image for post
Image for post

A far better solution

Optionals and WeakReferences

Conclusion

Google Developer Expert for Flutter and passionate Android developer #kotlin working at @grandcentrix in Cologne

Get the Medium app