import 'package:flutter/material.dart';

class QuantityBox extends StatelessWidget {
  final int label;
  final bool isSelected;
  final Function(int) onTapFunc;

  QuantityBox({
    Key key,
    this.label,
    this.onTapFunc, this.isSelected = false,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        InkWell(
          child: Container(
            decoration: BoxDecoration(
                border: Border.all(color:isSelected?Colors.green: Colors.grey[300]),
              color: Colors.white,
            ),
            alignment: Alignment.center,
            width: 50.0,

            child: Text(
              '$label',
              style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
            ),
          ),
          onTap:(){
            onTapFunc(label);
          }
        ),
        SizedBox(
          width: 5,
        )
      ],
    );
  }
}
