bodyHeader method

Widget bodyHeader(
  1. BuildContext context
)

Implementation

Widget bodyHeader(BuildContext context) {
  return Column(
    children: [
      Container(
        padding: const EdgeInsets.all(16),
        margin: const EdgeInsets.all(16),
        width: double.infinity,
        decoration: BoxDecoration(
          color: (Theme.of(context).brightness == Brightness.dark)
              ? Theme.of(context).colorScheme.surface
              : Theme.of(context)
                  .colorScheme
                  .primaryContainer
                  .withOpacity(0.25),
          borderRadius: BorderRadius.circular(8),
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            TitledLabel(
              title: 'Url',
              text: httpActivity.request?.baseUrl,
            ),
            const SizedBox(height: 8),
            TitledLabel(
              title: 'Path',
              text: httpActivity.request?.path,
            ),
          ],
        ),
      ),
      TabBar(
        labelStyle: Theme.of(context).textTheme.labelLarge,
        labelColor: Theme.of(context).colorScheme.onSurface,
        indicatorColor: Theme.of(context).colorScheme.primary,
        unselectedLabelColor: Theme.of(context).colorScheme.surface,
        tabs: [
          Tab(
            child: Text(
              'Request',
              style: Theme.of(context).textTheme.bodyLarge,
            ),
          ),
          Tab(
            child: Text(
              'Response',
              style: Theme.of(context).textTheme.bodyLarge,
            ),
          ),
          Tab(
            child: Text(
              'Error',
              style: Theme.of(context).textTheme.bodyLarge,
            ),
          ),
        ],
      ),
    ],
  );
}