TkfAppBar constructor

TkfAppBar({
  1. Key? key,
  2. String? backButtonTestKey,
  3. Color backColor = kAppBarBackground,
  4. Color? iconColor,
  5. dynamic title = '',
  6. dynamic isLeading = true,
  7. required Function onPop,
  8. TextStyle? titleStyle,
  9. dynamic centerTitle = false,
  10. Widget? titleWidget,
})

Implementation

TkfAppBar(
    {super.key,
    String? backButtonTestKey,
    Color backColor = kAppBarBackground,
    Color? iconColor,
    title = '',
    isLeading = true,
    required Function onPop,
    TextStyle? titleStyle,
    centerTitle = false,
    Widget? titleWidget})
    : super(
        preferredSize: const Size.fromHeight(kToolbarHeight),
        child: AppBar(
          leading: isLeading
              ? TkfBackButton(
                  onPress: () => onPop(),
                  iconColor: iconColor,
                  testKeyName: backButtonTestKey,
                )
              : null,
          automaticallyImplyLeading: isLeading,
          backgroundColor: backColor,
          elevation: 0.0,
          centerTitle: centerTitle,
          title: titleWidget ??
              Padding(
                padding: const EdgeInsets.only(bottom: 0.0),
                child: Text(
                  title,
                  style: titleStyle,
                ),
              ),
          toolbarHeight: kToolbarHeight,
        ),
      );