Skip to content

Instantly share code, notes, and snippets.

@robotsquidward
Created September 30, 2020 12:51

Revisions

  1. robotsquidward created this gist Sep 30, 2020.
    5 changes: 5 additions & 0 deletions extension-with-factory.kt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    private val model: MyViewModel by activityViewModels {
    createWithFactory {
    MyViewModel(repo = MyRepository())
    }
    }