completed the mobile app for he boss to review the stock report
This commit is contained in:
30
boss_app2/lib/controller/datatables_laporan.dart
Normal file
30
boss_app2/lib/controller/datatables_laporan.dart
Normal file
@ -0,0 +1,30 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyData extends DataTableSource {
|
||||
// Generate some made-up data
|
||||
final List<Map<String, dynamic>> _data = List.generate(
|
||||
200,
|
||||
(index) => {
|
||||
"id": index,
|
||||
"title": "Item $index",
|
||||
"price": Random().nextInt(10000),
|
||||
},
|
||||
);
|
||||
|
||||
@override
|
||||
bool get isRowCountApproximate => false;
|
||||
@override
|
||||
int get rowCount => _data.length;
|
||||
@override
|
||||
int get selectedRowCount => 0;
|
||||
@override
|
||||
DataRow getRow(int index) {
|
||||
return DataRow(cells: [
|
||||
DataCell(Text(_data[index]['id'].toString())),
|
||||
DataCell(Text(_data[index]["title"])),
|
||||
DataCell(Text(_data[index]["price"].toString())),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user