Package com.example.examer.utils

Types

Link copied to clipboard
class ExamerPasswordManager(application: Application) : PasswordManager

A concrete implementation of PasswordManager that uses EncryptedSharedPreferences under the hood.

Link copied to clipboard
class LogInViewModelFactory(    authenticationService: AuthenticationService,     passwordManager: PasswordManager,     dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main)) : ViewModelProvider.Factory

A ViewModelProvider.Factory that is used for creating an instance of ExamerLogInViewModel.

Link copied to clipboard
interface PasswordManager

An interface that specifies the methods that are required for a concrete implementation of PasswordManager.

Link copied to clipboard
class Previos(    mediaPlayer: MediaPlayer,     testDetails: TestDetails,     workBookList: List<WorkBook>,     markTestAsCompletedUseCase: MarkTestAsCompletedUseCase) : ViewModelProvider.Factory
Link copied to clipboard
class PreviousTestsViewModelFactory(authenticationService: AuthenticationService, repository: Repository) : ViewModelProvider.Factory
Link copied to clipboard
class ProfileScreenViewModelFactory(    application: Application,     repository: Repository,     authenticationService: AuthenticationService,     passwordManager: PasswordManager,     credentialsValidationUseCase: CredentialsValidationUseCase) : ViewModelProvider.Factory

A ViewModelProvider.Factory that is used for creating an instance of ExamerProfileScreenViewModel.

Link copied to clipboard
class SignUpViewModelFactory(    authenticationService: AuthenticationService,     passwordManager: PasswordManager,     credentialsValidationUseCase: CredentialsValidationUseCase,     dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main)) : ViewModelProvider.Factory

A ViewModelProvider.Factory that is used for creating an instance of ExamerSignUpViewModel.

Link copied to clipboard
class TestSessionViewModelFactory(    mediaPlayer: MediaPlayer,     testDetails: TestDetails,     workBookList: List<WorkBook>,     markTestAsCompletedUseCase: MarkTestAsCompletedUseCase) : ViewModelProvider.Factory
Link copied to clipboard
class TestsViewModelFactory(    authenticationService: AuthenticationService,     repository: Repository,     testDetailsListType: TestDetailsListType) : ViewModelProvider.Factory

A ViewModelProvider.Factory that is used for creating an instance of ExamerTestsViewModel.

Link copied to clipboard
class WorkBookViewModelFactory(application: Application) : ViewModelProvider.Factory

Functions

Link copied to clipboard
fun buildCountDownTimer(    millisInFuture: Long,     countDownInterval: Long,     onTimerTick: (millisUntilFinished: Long) -> Unit,     onTimerFinished: () -> Unit = {}): CountDownTimer

A utility function that is used to create an instance of CountDownTimer .

Link copied to clipboard
fun Modifier.conditional(condition: Boolean, modifierScope: Modifier.() -> Modifier): Modifier

An extension function that can be used to conditionally chain a modifier.

Link copied to clipboard
fun String.containsDigit(): Boolean

Returns true if the string contains at least one digit. Else, returns false.

Link copied to clipboard
fun String.containsLowercase(): Boolean

Returns true if the string contains at least one lowercase letter. Else, returns false.

Link copied to clipboard
fun String.containsUppercase(): Boolean

Returns true if the string contains at least one uppercase letter. Else, returns false.

Link copied to clipboard
fun Context.isDeviceAutomaticDateTimeEnabled(): Boolean

An extension function that returns true if the device's date/time are set automatically by Android. It returns false, if the device's date/time is set manually by the user.

Link copied to clipboard
fun Context.isDeviceAutomaticTimeZoneEnabled(): Boolean

An extension function that returns true if the device's time zone is set automatically by Android. It returns false, if the the device's time zone is set manually by the user.

Link copied to clipboard
fun Int.isSingleDigit(): Boolean

Returns a Boolean indicating whether an integer has the ten's place.

Link copied to clipboard
fun Int.toString(appendZeroIfSingleDigit: Boolean): String

Returns a string with a zero appended at the beginning if the integer isSingleDigit and also appendZeroIfSingleDigit is set to true. Else it returns the default Int.toString.