import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'app_colors.dart';

PreferredSizeWidget appbar(BuildContext context, title) {
  return AppBar(
    automaticallyImplyLeading: false,
    elevation: 2.0,
    title: SizedBox(
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          InkResponse(
            onTap: () => Navigator.pop(context, true),
            child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
          ),
          Text(
            title,
            style: TextStyle(
              fontSize: 16,
              height: 1.1,
              color: AppColors.semi_black,
            ),
          ),
        ],
      ),
    ),
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(
        bottom: Radius.circular(30), // Adjust the radius as needed
      ),
    ),
  );
}
