DefaultProfileCard constructor

DefaultProfileCard({
  1. Key? key,
  2. required int height,
  3. required String title,
  4. required Widget icon,
  5. required double width,
  6. required double iconSize,
  7. Gradient? gradient,
  8. int? currentIndex,
  9. bool? actionsEnabled,
  10. dynamic onTabChange(
    1. int? value
    )?,
  11. dynamic onSelectActionItem(
    1. String? value
    )?,
  12. Map<String, String>? actionItemsLabelValueMap,
  13. bool? tabBarEnabled,
  14. List<ProfileDetailsTab>? tabs,
  15. String? objType,
  16. Axis? direction,
  17. Widget? rightWidget,
  18. String? subTitle,
})

Implementation

DefaultProfileCard(
    {Key? key,
    required this.height,
    required this.title,
    required this.icon,
    required this.width,
    required this.iconSize,
    this.gradient,
    this.currentIndex,
    this.actionsEnabled,
    this.onTabChange,
    this.onSelectActionItem,
    this.actionItemsLabelValueMap,
    this.tabBarEnabled,
    this.tabs,
    this.objType,
    this.direction,
    this.rightWidget,
    this.subTitle})
    : super(key: key) {
  if (actionsEnabled == true &&
      (onSelectActionItem == null || actionItemsLabelValueMap == null)) {
    throw Exception("actions enabled but onSelect is null");
  }
  if (tabBarEnabled == true &&
      (tabs == null || currentIndex == null || onTabChange == null)) {
    throw Exception(
        "tabs enabled but onTabChange, currentIndex or tabs is null");
  }
}