-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
DART Cookbook
By :
As indicated in the previous recipe, every kind of app can contain a lib folder, which at the very least contains the model classes. These model classes are very important because they form the backbone of your project, so they must be accessible in your entire application. You can do this by placing them at the top in a lib folder, or even better in the lib/model. This central position will also make them stand out and easy to find for other readers of your code.
Take a look at the structure of the bank_terminal project. The model classes Person and BankAccount are placed in the lib\model folder. Give your project a name in the pubspec.yaml file:
name: bank_terminal
Then, use the same name for the library script you created in the lib folder bank_terminal.dart, which contains the following code:
library bank_terminal;
import 'dart:convert';
part 'model/bank_account.dart';
part 'model/person.dart';The library...
Change the font size
Change margin width
Change background colour