titleX method

void titleX({
  1. Widget? left,
  2. Widget? title,
  3. Widget? right,
  4. bool closable = true,
})

Implementation

void titleX({Widget? left, Widget? title, Widget? right, bool closable = true}) {
  if (title == null && left == null && right == null) return;
  var w = RowMax([
    if (left != null) left,
    if (title != null) title,
    Spacer(),
    if (right != null) right,
    if (closable)
      IconButton(
        onPressed: clickCancel,
        icon: Icons.close.icon(size: 16, color: context.themeData.colorScheme.onPrimary),
      ),
  ]).padded(edges(left: 16, right: 8, top: 4, bottom: 4)).coloredBox(context.themeData.colorScheme.primary);
  panelTitle = DefaultTextStyle(
    textAlign: TextAlign.left,
    style: context.themeData.textTheme.titleMedium!.copyWith(color: context.themeData.colorScheme.onPrimary),
    child: w,
  );
}