import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
XMAppBar(String title, String rightTitle, bool showBack,
VoidCallback rightButtonClick) {
return AppBar(
centerTitle: true,
titleSpacing: 0,
shadowColor: Colors.white,
leading: showBack ? BackButton() : null,
title: Text(
title,
style: TextStyle(fontSize: 18),
),
actions: [
InkWell(
onTap: rightButtonClick,
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.only(left: 10, right: 10),
child: Text(
rightTitle,
style: TextStyle(fontSize: 16, color: Colors.black),
),
),
)
],
);
}
```
```