Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "As soon as the page loads, it will check whether our CartModel
instance is ready."
A block of code is set as follows:
class CartModel { List<Item> cart; CartModel({required this.cart}); }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
@override Widget build(BuildContext context) { // One var model = getIt<CartModel>(); var cart = model.cart;
Any command-line input or output is written as follows:
flutter packages pub run build_runner build
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "Type each one of the libraries mentioned previously and pick their latest dependency from their websites' Installing tabs."
Tips or important notes
Appear like this.