From 97693ca3ec5ab3179c46aba63cf0920528320c24 Mon Sep 17 00:00:00 2001 From: Daniel Eshkeri Date: Mon, 11 Nov 2024 14:57:26 +0000 Subject: [PATCH] docs: added more info to global header. Info about where to use the header --- .../global_header/global_header.dart | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/src/components/global_header/global_header.dart b/lib/src/components/global_header/global_header.dart index b92853bf..f2362c2c 100644 --- a/lib/src/components/global_header/global_header.dart +++ b/lib/src/components/global_header/global_header.dart @@ -5,6 +5,36 @@ import 'package:flutter/rendering.dart'; import '../../../zeta_flutter.dart'; /// Global header component +/// This component should not be used as an appbar in a scaffold. +/// It can be used in custom scroll views and columns. +/// +/// ``` +/// SingleChildScrollView( +/// child: Column(children: [ +/// ZetaGlobalHeader( +/// title: "Title", +/// tabItems: childrenOne, +/// searchBar: ZetaSearchBar(shape: ZetaWidgetBorder.full, size: ZetaWidgetSize.large), +/// onAppsButton: () {}, +/// actionButtons: [ +/// IconButton( +/// onPressed: () {}, +/// icon: const ZetaIcon( +/// ZetaIcons.alert, +/// ), +/// ), +/// IconButton( +/// onPressed: () {}, +/// icon: const ZetaIcon( +/// ZetaIcons.help, +/// ), +/// ), +/// ], +/// avatar: const ZetaAvatar(initials: 'PS'), +/// ), +/// ]), +/// ), +/// ``` /// {@category Components} /// /// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=1120-26358&node-type=canvas&m=dev