DefaultProfileCard constructor
DefaultProfileCard({
- Key? key,
- required int height,
- required String title,
- required Widget icon,
- required double width,
- required double iconSize,
- Gradient? gradient,
- int? currentIndex,
- bool? actionsEnabled,
- dynamic onTabChange(
- int? value
- dynamic onSelectActionItem(
- String? value
- Map<
String, String> ? actionItemsLabelValueMap, - bool? tabBarEnabled,
- List<
ProfileDetailsTab> ? tabs, - String? objType,
- Axis? direction,
- Widget? rightWidget,
- 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");
}
}