FairWidget constructor
FairWidget({
- Key? key,
- String? name,
- String? path,
- Map<
String, dynamic> ? data, - WidgetBuilder? holder,
- FairDelegate? delegate,
- bool? wantKeepAlive = false,
Implementation
FairWidget({
Key? key,
this.name,
this.path,
this.data,
this.holder,
this.delegate,
this.wantKeepAlive = false,
}) : assert(!(name == null && path == null), 'FairWidget require a global registered `name` or bundle `path`'),
assert(() {
if (data == null) return true;
if (!(data is Map && data.values.every((e) => e is int || e is double || e is String))) {
log('data must be a map of primary value such as int, double or String. Object reference can be broken!');
}
return true;
}(), ''),
super(key: key);