getItemStyle method

  1. @override
FortuneItemStyle getItemStyle(
  1. ThemeData theme,
  2. int index,
  3. int itemCount
)
override

Creates an FortuneItemStyle based on the passed theme while considering an item's index with respect to the overall itemCount.

Implementation

@override
FortuneItemStyle getItemStyle(ThemeData theme, int index, int itemCount) {
  return getDisabledItemStyle(
    theme,
    index,
    itemCount,
    () => FortuneItemStyle(
      color: _getFillColor(theme, index, itemCount),
      borderColor: theme.colorScheme.primary,
      borderWidth: 0.0,
      textAlign: TextAlign.start,
      textStyle: TextStyle(color: theme.colorScheme.onPrimary),
    ),
  );
}