Stack_Chat function

Widget Stack_Chat({
  1. required Widget header,
  2. required List content,
  3. required Widget bumper,
})

Implementation

Widget Stack_Chat({
    required Widget header,
    required List<dynamic> content,
    required Widget bumper,
}) {
    return PopScope(
        canPop: false,
        child: Scaffold(
            body: SafeArea(
                child: Column(
                    children: [
                        header,
                        if (content[0]) Expanded(
                            child: Container(
                                padding: const EdgeInsets.all(24),
                                child: content[1],
                            ),
                        ) else const Expanded(
                            child: Center(
                                child: CustomText(
                                    variant: 'text',
                                    font_size: 'md',
                                    text_color: 'text_secondary',
                                    txt: 'No messages yet.',
                                ),
                            ),
                        ),
                        bumper,
                    ],
                ),
            ),
        ),
    );
}