CPDFBotaConfig.fromJson constructor
CPDFBotaConfig.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CPDFBotaConfig.fromJson(Map<String, dynamic> json) {
return CPDFBotaConfig(
tabs: (json['tabs'] as List<dynamic>?)
?.map((e) => CPDFBotaTabs.values.firstWhere(
(tab) => tab.name == e,
orElse: () => CPDFBotaTabs.outline,
))
.toList() ??
const [
CPDFBotaTabs.outline,
CPDFBotaTabs.bookmark,
CPDFBotaTabs.annotations
],
menus: json['menus'] != null
? CPDFBotaMenuConfig.fromJson(json['menus'])
: const CPDFBotaMenuConfig(),
);
}