|
|
|
|
@ -1,15 +1,16 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class LakumPointTableRowWidget extends StatefulWidget {
|
|
|
|
|
final bool isTableTitle; // true : title , false: row
|
|
|
|
|
final String tableType; // month, day
|
|
|
|
|
final String rowTitle;
|
|
|
|
|
final double points;
|
|
|
|
|
final double riyal;
|
|
|
|
|
final Function onTap;
|
|
|
|
|
final int rowIndex;
|
|
|
|
|
|
|
|
|
|
LakumPointTableRowWidget(
|
|
|
|
|
this.isTableTitle, this.tableType, this.points, this.riyal, this.onTap, this.rowIndex);
|
|
|
|
|
LakumPointTableRowWidget(this.isTableTitle, this.rowTitle, this.points,
|
|
|
|
|
this.riyal, this.onTap, this.rowIndex);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_LakumPointTableRowWidgetState createState() =>
|
|
|
|
|
@ -20,12 +21,48 @@ class _LakumPointTableRowWidgetState extends State<LakumPointTableRowWidget> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
bool isEven = widget.rowIndex % 2 == 0;
|
|
|
|
|
return Container(
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: widget.onTap,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: isEven ? Color(0xffefefef) : Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
widget.rowTitle,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: widget.isTableTitle
|
|
|
|
|
? FontWeight.bold
|
|
|
|
|
: FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
widget.isTableTitle ? "POINTS" : widget.points,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: widget.isTableTitle
|
|
|
|
|
? FontWeight.bold
|
|
|
|
|
: FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Texts(
|
|
|
|
|
widget.isTableTitle ? "RIYAL" : widget.riyal,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: widget.isTableTitle
|
|
|
|
|
? FontWeight.bold
|
|
|
|
|
: FontWeight.normal,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: widget.isTableTitle
|
|
|
|
|
? Container()
|
|
|
|
|
: Icon(Icons.arrow_forward_ios)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
@ -37,6 +74,7 @@ class _LakumPointTableRowWidgetState extends State<LakumPointTableRowWidget> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|