import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
import 'package:fcs/helpers/theme.dart' as theme;

class NumberCell extends StatelessWidget {
  final int number;
  final numberFormatter;
  final TextStyle textStyle;

  NumberCell(this.number, {Key key, this.textStyle})
      : numberFormatter = new NumberFormat("#,###"),
        super(key: key);

  @override
  Widget build(BuildContext context) {
    return new Text(
        this.number == null ? '0' : numberFormatter.format(this.number),
        style: textStyle == null ? theme.textStyle : textStyle);
  }
}
