import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';

AppBar appBar(BuildContext context, {required String title}) {
  return AppBar(
    title: title.toText24(color: MyColors.darkTextColor),
    centerTitle: false,
    automaticallyImplyLeading: false,
    backgroundColor: Colors.white,

    actions: [
      IconButton(
        onPressed: () {
          Navigator.pop(context);
        },
        icon: Icon(
          Icons.close,
          color: MyColors.darkIconColor,
        ),
      ),
    ],
  );
}
