[Insert context description here]
[Create this diagram from the architecture file (context tab) using Draw.io]
This is a summary of the functionalities available to the user.
[Insert list of functionalities here]
[Insert structure description here]
[Create this diagram from the architecture file (structure tab) using Draw.io]
The application solution is divided in 2 main areas.
testcontains the tests.libcontains the shared code used by the application and the tests.- It's divided per application layer.
The data access layer is where you would put external dependencies such as API clients and local storage.
Classes providing data should be suffixed with Repository.
This is where you put serializable entities.
The associated folder is named access (and not data_access) so that it shows as the first element alphabetically.
The business layer is where you put your business services and entities that manipulate data from the data access layer.
Classes providing business services should be suffixed with Service.
Entities from the business layer are usually immutable and they don't need to be serializable.
The presentation layer implements the user experience (UX) and the user interface (UI). It contains all the widgets and state management classes.
Topics that apply to the whole application.
This application is designed to use dependency injection (DI) to manage dependencies between components.
See DependencyInjection.md for more details.
This application contains a diagnostic overlay.
See Diagnostics.md for more details.
This application contains a built-in logging system that can be used to log messages to the debugger's console, to the native consoles, or to a file.
See Logging.md for more details.
This application contains a forced update feature.
See ForcedUpdate.md for more details.
This application contains a kill switch feature.
See KillSwitch.md for more details.
Data access services (also referred to as repositories) are always declared using an interface and implemented in a separate class. These interfaces are meant to be used from the business layer.
See HTTP.md for more details.
This application uses Shared Preferences to store data locally.
See Serialization.md for more details.
Business services are always declared using an interface and implemented in a separate class. These interfaces are meant to be used from the presentation layer and sometimes by other business services.
See Navigation.md for more details.
This application uses the MVVM pattern. The ViewModel class is used as a base class for all ViewModels.
ViewModels have the concept of dynamic properties.
These defined using accessors that call the get (or variants such as getLazy) and optionally set methods to automatically trigger widget rebuilds.
Here is an example of a ViewModel showcasing the usage of dynamic properties.
class HomePageViewModel extends ViewModel {
// Regular properties don't trigger rebuild if changed.
final String title = 'Flutter Demo Home Page';
// Dynamic properties triggers rebuild if changed.
int get counter => get('counter', 0);
set counter(int value) => set('counter', value);
// Dynamic properties can be made using complex sources, such as streams.
int get autoCounter => getFromStream('autoCounter',
() => Stream.periodic(const Duration(seconds: 1), (i) => i), 0);
List<HomeItemViewModel> get items => getLazy(
'items',
() => [
HomeItemViewModel('1'),
HomeItemViewModel('2'),
HomeItemViewModel('3'),
]);
Future<int> get someData => getLazy('someData', _loadSomeData);
set someData(Future<int> value) => set('someData', value);
Future<int> _loadSomeData() async {
await Future.delayed(const Duration(seconds: 2));
return 42;
}
void reloadSomeData() {
someData = _loadSomeData();
}
}This applications uses Flutter as the UI framework.
This application uses resources from Material Design.
The application's theme data is defined in the global_theme_data file in the styles folder.
Any other files related to the application's design system should be added to this folder.
This application uses flutter_localization to deal with the localization of strings into multiple languages.
See Localization.md for more details.


