import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:satu/shared/app_colors.dart';
import 'package:satu/shared/shared_styles.dart';
import 'package:satu/shared/ui_helpers.dart';

class ContragentListItem extends StatelessWidget {
  const ContragentListItem({Key? key, this.name, this.onPress})
      : super(key: key);

  final String? name;
  final Function? onPress;



  @override
  Widget build(BuildContext context) {
    return ListTile(
      onTap: () => onPress!(),
      contentPadding:
          const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
      title: Padding(
        padding: const EdgeInsets.only(top: 4.0),
        child: Container(
            decoration: const BoxDecoration(color: whiteColor),
            height: 50,
            child: Center(
              child: Text(
                name!,
                style: TextStyle(
                    fontWeight: FontWeight.w600,
                    color: Colors.black,
                    fontSize: 15),
                overflow: TextOverflow.ellipsis,
                maxLines: 3,
              ),
            )),
      ),
    );
  }
}
