Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

MutableLiveData initialised on declaration please. #64

Open
Gordon-McCrone opened this issue Dec 31, 2017 · 0 comments
Open

MutableLiveData initialised on declaration please. #64

Gordon-McCrone opened this issue Dec 31, 2017 · 0 comments

Comments

@Gordon-McCrone
Copy link

Example:
val liveArticleData = MutableLiveData

()
When liveArticleData.value is used compiler requires forced unwrap (!!)
Forced unwrap is considered last resort and poor programming practice.

Request:
To be able to initialize MutableLiveData at declartion, so do not have to check null.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant