This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val movieData = movies { | |
title = "Avengers: Infinity War" | |
genres = "Action, Adventure, Fantasy, Sci-Fi" | |
release_date = "27 April 2018 (USA)" | |
detailMovies { | |
country = "USA" | |
language = "English" | |
directed_by = " Anthony Russo, Joe Russo" | |
produced_by = "Kevin Feige" | |
overview = "As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Movies( | |
var genres: String? = null, | |
var title: String? = null, | |
var release_date: String? = null, | |
var detailMovies: DetailMovies? = null | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class DetailMovies( | |
var country: String? = null, | |
var language: String? = null, | |
var directed_by: String? = null, | |
var produced_by: String? = null, | |
var overview: String? = null | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create function to store movies data | |
*/ | |
fun movies(inputs: Movies.() -> Unit): Movies = Movies().apply(inputs) | |
/** | |
* Create function to store detail movies data | |
*/ | |
fun Movies.detailMovies(inputs: DetailMovies.() -> Unit) { | |
detailMovies = DetailMovies().apply(inputs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val movieData = movies { | |
it.title = "Avengers: Infinity War" | |
it.genres = "Action, Adventure, Fantasy, Sci-Fi" | |
it.release_date = "27 April 2018 (USA)" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val movieData = movies { | |
title = "Avengers: Infinity War" | |
genres = "Action, Adventure, Fantasy, Sci-Fi" | |
release_date = "27 April 2018 (USA)" | |
detailMovies { | |
country = "USA" | |
language = "English" | |
directed_by = " Anthony Russo, Joe Russo" | |
produced_by = "Kevin Feige" | |
overview = "As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create function to store movies data | |
*/ | |
fun movies(inputs: (Movies) -> Unit): Movies { | |
val movie = Movies() | |
inputs(movie) | |
return movie | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create function to store movies data | |
*/ | |
fun movies(inputs: Movies.() -> Unit): Movies = Movies().apply(inputs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val movieData = movies { | |
title = "Avengers: Infinity War" | |
genres = "Action, Adventure, Fantasy, Sci-Fi" | |
release_date = "27 April 2018 (USA)" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoginContract { | |
interface View { | |
fun goToOtpPage(userId: String) | |
fun showError(message: String) | |
fun onLoginButtonClicked() | |
} | |
interface Presenter { | |
fun onLoginBtnPressed(username: String, password: String) | |
fun onLoginSuccess(userid: String) |
OlderNewer