initialize static method
FrConfig
initialize({
- Level logLevel = Level.INFO,
- FrLogRecordPrinter printer = LoggableMx.devLogRecordPrinter,
- FrUnion? frUnion,
- GetIt? di,
Creates and applies the global FlowR configuration.
logLevel sets Logger.root.level.
printer receives records from Logger.root.onRecord. Calling FrConfig
again replaces the previous FlowR log listener instead of adding another
listener.
frUnion registers a global FrUnionViewModel. Set it to null to skip the
global union feature.
di defaults to GetIt.I.
replaceFrUnion controls whether an existing FrUnionViewModel
registration should be replaced when frUnion is provided.
Implementation
static FrConfig initialize({
Level logLevel = Level.INFO,
FrLogRecordPrinter printer = LoggableMx.devLogRecordPrinter,
FrUnion? frUnion,
GetIt? di,
}) {
final config = FrConfig._(
logLevel: logLevel,
printer: printer,
frUnion: frUnion,
di: di ?? GetIt.I,
);
config._apply();
_instance = config;
return config;
}