tableOwnerIndicator method

Widget tableOwnerIndicator(
  1. BuildContext context
)

Implementation

Widget tableOwnerIndicator(BuildContext context) {
  const shape = StadiumBorder();

  return Material(
    type: MaterialType.transparency,
    child: InkWell(
      customBorder: shape,
      onTap: () {},
      child: Ink(
        padding: const EdgeInsets.fromLTRB(4, 4, 16, 4),
        decoration: ShapeDecoration(
          shape: shape,
          color: Colors.white.withValues(alpha: 0.7),
        ),
        child: Row(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          spacing: 8,
          children: [
            AspectRatio(
              aspectRatio: 1,
              child: Container(
                decoration: BoxDecoration(
                  shape: BoxShape.circle,
                  color: Theme.of(context).colorScheme.primary,
                ),
                child: Center(
                  // TODO: replace with avatar photo
                  child: FittedBox(
                    fit: BoxFit.scaleDown,
                    child: Text(
                      '孫',
                      style: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.bold,
                      ),
                    ),
                  ),
                ),
              ),
            ),
            RichText(
              text: TextSpan(
                // TODO: Design text style here
                style: DefaultTextStyle.of(context).style,
                children: [
                  TextSpan(text: "孫培鈞"),
                  // TODO: Enable this dropdown indicator when course table sharing feature is implemented
                  // WidgetSpan(
                  //   alignment: PlaceholderAlignment.middle,
                  //   child: Icon(
                  //     Icons.arrow_drop_down_outlined,
                  //     size:
                  //         (DefaultTextStyle.of(context).style.fontSize ?? 14) *
                  //         1.5,
                  //   ),
                  // ),
                ],
              ),
            ),
          ],
        ),
      ),
    ),
  );
}