import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:qadirneyriz/config/config.dart';

class CustomAppbar extends StatelessWidget {
  final String? title;
  const CustomAppbar({super.key, this.title});

  @override
  Widget build(BuildContext context) {
    return SliverAppBar(
      title: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          const SizedBox(),
          Text(
            this.title == null ? '' : this.title ?? '',
            style: const TextStyle(
              fontSize: 12,
              color: Colors.black,
            ),
          ),
          Image.asset(
            'assets/images/D2.png', // مسیر لوگو رو اینجا قرار بده
            height: 40,
          ),
        ],
      ),
      backgroundColor: config.ui.backGroundColor,
    );
  }
}
