// ignore_for_file: must_be_immutable, deprecated_member_use

import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:lba/res/colors.dart';

class OrderType extends StatelessWidget {
  String icon;
  String typename;
  bool fill;

  OrderType({super.key, required this.icon, required this.typename,required this.fill});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(25),
        border: Border.all(color: Color.fromARGB(255, 76, 175, 80), width: 1.0),
        color: fill==false?Colors.transparent:LightAppColors.fillOrder
      ),
      child: Padding(
        padding: const EdgeInsets.fromLTRB(6, 2, 6, 2),
        child: Row(
          children: [
            SvgPicture.asset(
              icon,
              color: fill==false? Color.fromARGB(255, 95, 95, 95):LightAppColors.fillOrderText,
              height: 17,
            ),
            SizedBox(width: 2),
            Text(
              typename,
              style: TextStyle(
                color: fill==false? Color.fromARGB(255, 95, 95, 95):LightAppColors.fillOrderText,
                fontWeight: FontWeight.w500,
                fontSize: 12
              ),
            ),
          ],
        ),
      ),
    );
  }
}
