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.
car_customer_app/lib/widgets/app_bar.dart

33 lines
972 B
Dart

import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/theme/colors.dart';
import 'package:flutter/material.dart';
AppBar appBar(
BuildContext context, {
Color? backgroundColor,
double? elevation,
String? title,
Color? titleColor,
bool? isTitleCenter,
Color? backIconColor,
List<Widget>? actions,
bool isRemoveBackButton = false,
}) {
return AppBar(
backgroundColor: backgroundColor ?? appBackgroundColor,
elevation: elevation ?? 0,
centerTitle: isTitleCenter ?? true,
leading: isRemoveBackButton
? null
: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
iconTheme: IconThemeData(
color: backIconColor ?? Colors.black, //change your color here
),
actions: actions,
title: (title ?? "").toText(fontSize: 20, isBold: true),
);
}