Creating the signup presenter

As we did when creating the LoginPresenter, we need to create a SignUpPresenter interface along with a SignUpPresenterImpl class. The SignUpPresenter we are making is in no way complex. For this application, we need our signup presenter to possess a property of the AppPreferences type as well as a function that executes the signup process. The following is the SignUpPresenter interface:

package com.example.messenger.ui.signupimport com.example.messenger.data.local.AppPreferencesinterface SignUpPresenter {  var preferences: AppPreferences  fun executeSignUp(username: String, phoneNumber: String, password: String)}

Now, here is the code for our SignUpPresenter implementation:

package com.example.messenger.ui.signup ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.