FlipMatrixBoardSingleChild.assetImage constructor

FlipMatrixBoardSingleChild.assetImage({
  1. Key? key,
  2. required String imageName,
  3. required Axis axis,
  4. required double width,
  5. required double height,
  6. required int columnCount,
  7. required int rowCount,
  8. Color? backgroundColor,
  9. int minAnimationMillis = 500,
  10. int maxAnimationMillis = 1500,
  11. int maxDelayMillis = 2500,
})

FlipMatrixBoardSingleChild specialized constructor to display an asset image.

Configure this FlipBoard with the number of rows and columns, flipping orientation and animation speed and delay parameters.

Recieves a single image name that will be rendered with BoxFit.fill option.

Implementation

FlipMatrixBoardSingleChild.assetImage({
  Key? key,
  required String imageName,
  required Axis axis,
  required double width,
  required double height,
  required int columnCount,
  required int rowCount,
  Color? backgroundColor,
  int minAnimationMillis = 500,
  int maxAnimationMillis = 1500,
  int maxDelayMillis = 2500,
}) : this(
        child: Image.asset(
          imageName,
          fit: BoxFit.fill,
          width: width,
          height: height,
        ),
        axis: axis,
        width: width,
        height: height,
        columnCount: columnCount,
        rowCount: rowCount,
        minAnimationMillis: minAnimationMillis,
        maxAnimationMillis: maxAnimationMillis,
        maxDelayMillis: maxDelayMillis,
        backgroundColor: backgroundColor,
      );