builder method

  1. @override
Widget builder(
  1. BuildContext context
)
override

Implementation

@override
Widget builder(BuildContext context) {
  final theme = hubbleThemeData(context);
  final state = context.getViewState();
  return Scaffold(
      appBar: AppBar(
        leading: const PageBackButton(),
        backgroundColor: theme.backgroundColor,
      ),
      backgroundColor: theme.backgroundColor,
      body: Padding(
        padding:
            EdgeInsets.only(left: theme.sizes[24], right: theme.sizes[24]),
        child: CustomScrollView(slivers: [
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              theme.height12,
              HubbleText(
                state.faq.question,
                style: theme.typography.s24.copyWith(
                  fontWeight: FontWeight.w700,
                  color: theme.colors.base.primary.dark,
                ),
              ),
              theme.height8,
              Container(
                color: theme.colors.textColorDark,
                height: theme.sizes[4],
                width: theme.sizes[56],
              ),
              theme.height16,
            ],
          ).sliverBox,
          HubbleSliverMarkdown(
            text: state.faq.answer,
          ),
          if (hubbleConfig().intercomEnabled)
            SliverToBoxAdapter(
                child: Padding(
              padding: const EdgeInsets.all(32.0),
              child: HubbleButton.medium(
                isGhost: true,
                onPressed: () {
                  Haptics.light();
                  hubbleSupport().open(
                    screenName: 'profile_tab',
                    props: {},
                  );
                },
                child: const HubbleText('Contact Us'),
              ),
            )),
        ]),
      ));
}