update data table
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/widgets/dialog_input.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/my_data_table.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -45,25 +44,26 @@ class _CargoTableState extends State<CargoTable> {
|
||||
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: MyDataTable(
|
||||
child: DataTable(
|
||||
showCheckboxColumn: false,
|
||||
headingRowHeight: 40,
|
||||
columnSpacing: 40,
|
||||
columns: [
|
||||
MyDataColumn(
|
||||
DataColumn(
|
||||
label: LocalText(
|
||||
context,
|
||||
"cargo.type",
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
MyDataColumn(
|
||||
DataColumn(
|
||||
label: LocalText(
|
||||
context,
|
||||
"cargo.qty",
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
MyDataColumn(
|
||||
DataColumn(
|
||||
label: LocalText(
|
||||
context,
|
||||
"cargo.weight",
|
||||
@@ -76,21 +76,21 @@ class _CargoTableState extends State<CargoTable> {
|
||||
);
|
||||
}
|
||||
|
||||
List<MyDataRow> getCargoRows(BuildContext context) {
|
||||
List<DataRow> getCargoRows(BuildContext context) {
|
||||
if (cargoTypes == null) {
|
||||
return [];
|
||||
}
|
||||
var rows = cargoTypes!.map((c) {
|
||||
return MyDataRow(
|
||||
onSelectChanged: (bool selected) async {},
|
||||
return DataRow(
|
||||
onSelectChanged: (bool? selected) async {},
|
||||
cells: [
|
||||
MyDataCell(
|
||||
DataCell(
|
||||
new Text(
|
||||
c.name ?? '',
|
||||
style: textStyle,
|
||||
),
|
||||
),
|
||||
MyDataCell(
|
||||
DataCell(
|
||||
c.isCutomDuty!
|
||||
? GestureDetector(
|
||||
onTap: () async {
|
||||
@@ -128,7 +128,7 @@ class _CargoTableState extends State<CargoTable> {
|
||||
),
|
||||
),
|
||||
),
|
||||
MyDataCell(
|
||||
DataCell(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -185,10 +185,10 @@ class _CargoTableState extends State<CargoTable> {
|
||||
);
|
||||
}).toList();
|
||||
|
||||
var totalRow = MyDataRow(
|
||||
onSelectChanged: (bool selected) {},
|
||||
var totalRow = DataRow(
|
||||
onSelectChanged: (bool? selected) {},
|
||||
cells: [
|
||||
MyDataCell(Align(
|
||||
DataCell(Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: LocalText(
|
||||
context,
|
||||
@@ -197,8 +197,8 @@ class _CargoTableState extends State<CargoTable> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
)),
|
||||
MyDataCell(Text("")),
|
||||
MyDataCell(
|
||||
DataCell(Text("")),
|
||||
DataCell(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 48.0),
|
||||
child: Align(
|
||||
|
||||
Reference in New Issue
Block a user