You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App_New/lib/widgets/app_bar_widget.dart

33 lines
903 B
Dart

import 'package:hmg_patient_app_new/widgets/arrow_back.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
AppBar AppBarWidget(
BuildContext context, {
required String title,
String? image,
bool isNeedLeading = true,
List<Widget>? actions,
Function? onTap,
Color? backgroundColor,
Color? foregroundColor,
bool? isCenter,
}) {
return AppBar(
// leadingWidth: 0,
titleSpacing: -8,
leading: isNeedLeading
? ArrowBack(
onTap: onTap,
color: foregroundColor ?? whiteColor,
)
: Container(),
title: title.toText16(color: foregroundColor ?? whiteColor, isBold: true),
centerTitle: isCenter ?? true,
elevation: 0,
backgroundColor: backgroundColor ?? mainPurple,
actions: actions,
);
}