You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
945 B
Dart
43 lines
945 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
const double cellWidth = 50;
|
|
const double cellHeight = 25;
|
|
const double headHeight = 30;
|
|
|
|
class MultiplicationTableCell extends StatelessWidget {
|
|
final String text;
|
|
final Color color;
|
|
double width;
|
|
double height;
|
|
double fontsize;
|
|
AlignmentGeometry alignment;
|
|
String edgeRight;
|
|
|
|
MultiplicationTableCell({
|
|
this.text = '',
|
|
this.color,
|
|
this.width = cellWidth,
|
|
this.height = cellWidth,
|
|
this.fontsize = 16,
|
|
this.alignment = Alignment.centerRight,
|
|
this.edgeRight = ' ',
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: width,
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
border: Border.all(
|
|
color: Colors.black12,
|
|
width: 1.0,
|
|
),
|
|
),
|
|
alignment: alignment,
|
|
child: Text(text + edgeRight, style: TextStyle(fontSize: fontsize)),
|
|
);
|
|
}
|
|
}
|