Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “For example, in the build.gradle
file of the :app
module, include the following code in the dependencies
section.”
A block of code is set as follows:
class MessagesRepository @Inject constructor( private val dataSource: MessagesSocketDataSource ): IMessagesRepository { override suspend fun getMessages(): Flow<Message> { return dataSource.connect() }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
Scaffold( topBar = { TopAppBar( title = { Text(stringResource(R.string.chat_title, uiState.name.orEmpty())) } ) },
Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Android Studio will offer us a set of templates to start with. We will choose the Empty Activity option, as shown in the following screenshot:”
Tips or important notes
Appear like this.