FlutterArtist AppConfiguration
As mentioned in the introduction, FlutterArtist aims to organize the application systematically, much like arranging shelves in a well-structured warehouse. To achieve that orderliness, we need a centralized blueprint called AppConfiguration. This is where you declare the core components: from storage structures (Shelves), business logic (Activities) to technical adapters. Below is an illustrative example of how to set up this configuration class:
MyDemoAppConfiguration
class MyDemoAppConfiguration extends AppConfiguration {
@override
String get appName => "FlutterArtist Demo";
@override
List<ProjectionFamily> projectionFamilies() {
return [
ProjectionFamily<int>(
familyName: 'supplier-projections',
members: {SupplierInfo, SupplierData},
),
ProjectionFamily<int>(
familyName: 'album-projections',
members: {AlbumInfo, AlbumData},
),
];
}
@override
void registerActivities() {
FlutterArtist.storage.registerActivity(() => AppLoginActivity());
}
@override
void registerShelves() {
FlutterArtist.storage.registerShelf(() => Currency01aShelf());
FlutterArtist.storage.registerShelf(() => Song02aShelf());
// Other codes...
}
@override
List<FaTheme> additionalThemes() {
return FlutterArtistVibeThemeKit.supportedThemes;
}
@override
void overrideColorResolvers() {
//
}
@override
Future<void> showDebugNetworkInspector(BuildContext context) async {
bool isSystemUser = FlutterArtist.loggedInUser?.isSystemUser ?? false;
await DebugNetworkInspectorDialog.show(
context,
showJson: isSystemUser,
showToken: isSystemUser,
);
}
@override
FlutterArtistCoreFeaturesAdapter get coreFeaturesAdapter =>
MaterialFlutterArtistCoreFeaturesAdapter();
@override
FlutterArtistGlobalDataAdapter<IGlobalData> get globalDataAdapter =>
GlobalDataAdapterImpl();
@override
FlutterArtistLocaleAdapter get localeAdapter => FlutterArtistLocaleAdapter(
updateLocale: (Locale locale) async {
// ...
},
);
@override
FlutterArtistLoginLogoutAdapter<ILoggedInUser> get loginLogoutAdapter =>
LoginLogoutAdapterImpl();
@override
FlutterArtistNotificationAdapter? get notificationAdapter {
// NotificationAdapterImpl
return MyFirebaseNotificationAdapter();
}
}Starting the application is now more explicit through the FlutterArtist.start() method in main.dart.
main.dart (*)
await FlutterArtist.start(
appConfiguration: MyDemoAppConfiguration(),
...
);No ADS
To support the development process, you can utilize the Debug App Inspector. This tool helps you inspect the actual structure of the AppConfiguration, monitor the status of Shelf(s), and visually check data in real-time while the app is running. This centralized registration model may require initial meticulousness, but it helps maintain a Single Source of Truth. This minimizes data conflict errors and provides better control for large-scale projects. The combination of AppConfiguration's discipline and Debug App Inspector's transparency will make state management simpler and more professional.

- Giới thiệu về FlutterArtist
1. registerShelves()
The registerShelves() method allows you to register Shelf(s). Imagine having shelves that need to be placed in the correct positions within the warehouse before they can be used.
registerShelves()
@override
void registerShelves() {
FlutterArtist.storage.registerShelf(() => Country61aShelf());
FlutterArtist.storage.registerShelf(() => FootballPlayer86aShelf());
FlutterArtist.storage.registerShelf(() => ProjectContributor98aShelf());
} Anywhere in the application, you can access any shelf by searching for it within the storage.
FootballPlayer86aShelf shelf = FlutterArtist.storage.findShelf();If a Shelf is not registered, a runtime error will occur when you attempt to access it. A bright red error screen will appear to alert you.

2. registerActivities()
The registerActivities() method allows you to register Activity(s) — a data model and controller that simulates specific activities or functions. Essentially, an Activity is designed to handle complex logic that Block and Scalar do not cover, such as AppLoginActivity for authentication.
Note: Currently, the Activity design is in its early stages. Its scope is limited, and significant changes are expected in future versions to optimize its capabilities.
No ADS
registerActivities()
@override
void registerActivities() {
FlutterArtist.storage.registerActivity(() => AppLoginActivity());
}Similar to a Shelf, accessing an unregistered Activity will trigger a red screen error.
findActivity()
AppLoginActivity loginActivity = FlutterArtist.storage.findActivity();3. projectionFamilies()
The projectionFamilies() method allows you to define ProjectionFamily(s). This is a core concept that helps manage different data versions of the same entity.
- FlutterArtist Projections (***)
projectionFamilies()
@override
List<ProjectionFamily> projectionFamilies() {
return [
ProjectionFamily<int>(
familyName: 'supplier-projections',
members: {SupplierInfo, SupplierData},
),
ProjectionFamily<int>(
familyName: 'album-projections',
members: {AlbumInfo, AlbumData},
),
ProjectionFamily<int>(
familyName: 'company-projections',
members: {CompanyInfo, CompanyData, CompanyTreeItem, CompanyTree},
),
// ...
];
} 4. coreFeaturesAdapter
FlutterArtist was initially built upon the accessible features provided by GetX, such as Global BuildContext, Overlay, and SnackBar. Among these, the Overlay is a nearly transparent layer covering the entire screen, used to temporarily prevent user interaction with underlying widgets until an asynchronous task is completed.
No ADS
FlutterArtist
- FlutterArtist Debug Network Inspector
- Basic concepts in Flutter Artist
- FlutterArtist Block ex1
- FlutterArtist Filter Example
- FlutterArtist FilterModel MultiOptFilterCriterion ex1
- FlutterArtist FilterInput Example 1
- FlutterArtist Form ex1
- The idea of designing filter models in FlutterArtist
- FlutterArtist FormModel.patchFormFields() Ex1
- FlutterArtist BlockQuickItemUpdateAction Example
- FlutterArtist BlockNumberPagination Ex1
- FlutterArtist GridView Infinite Scroll Example
- FlutterArtist BlockQuickMultiItemCreationAction Example
- FlutterArtist ListView Infinite Scroll Pagination Example
- FlutterArtist Pagination
- FlutterArtist Sort DropdownSortPanel Example
- FlutterArtist Dio
- FlutterArtist BlockBackendAction Example
- FlutterArtist BackgroundWebDownloadAction Example
- FlutterArtist StorageBackendAction ex1
- FlutterArtist Block External Shelf Event Example
- FlutterArtist Filter FormBuilderMultiDropDown Ex1
- FlutterArtist Master-detail Blocks ex1
- FlutterArtist Scalar ex1
- FlutterArtist Pagination Davi table Infinite Scroll Ex1
- FlutterArtist Filter Tree FormBuilderField ex1
- FlutterArtist Filter FormBuilderRadioGroup ex1
- FlutterArtist Form Parent-child MultiOptFormProp ex1
- FlutterArtist Manual Sorting ReorderableGridView Example
- FlutterArtist Manual Sorting ReorderableListView
- FlutterArtist Scalar External Shelf Event Example
- FlutterArtist Code Flow Viewer
- FlutterArtist Log Viewer
- FlutterArtist config
- FlutterArtist AppConfiguration
- FlutterArtist Debug App Inspector
- lutterArtist Debug Filter Criteria Inspector
- FlutterArtist Debug Filter Model Inspector
- FlutterArtist Debug Form Model Inspector
- FlutterArtist DebugMenu
- FlutterArtist Debug UI Context Inspector
- FlutterArtist Debug Shelf Structure Inspector
- FlutterArtist Context Provider Views
- FlutterArtist FilterModelStructure ex1
- FlutterArtist FilterModelStructure ex2
- FlutterArtist FilterModelStructure ex3
- FlutterArtist Internal Shelf Event ex1
- FlutterArtist Deferring External Shelf Events Example
- FlutterArtist Face
- Overview of FlutterArtist Theme
- FlutterArtist Theme Design Tokens Architecture
- FlutterArtist Themes FaColorUtils
- Flutter Artist Theme - Create a custom theme
Show More