Skip to content

Commit

Permalink
Merge pull request #7 from ZainUlMustafa/tap-able-cells
Browse files Browse the repository at this point in the history
Tap able cells
  • Loading branch information
ZainUlMustafa committed Jun 18, 2022
2 parents b48336d + 1ca5752 commit 015f1c3
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 136 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Expand Up @@ -9,4 +9,11 @@
- Massive 16 different validations out-of-the-box, courtesy of FluttableVal
- FluttableValCheck is a complementing class to help customize validation rules
- Removed callable method in favour of onTableEdited, onRowAdded, and onRowDeleted
- Various issues resolved including faulty row data when a row was added
- Various issues resolved including faulty row data when a row was added
## 1.2.0
- First release of FluttableTapables is now available
- Features onRowTap and onCellTap out of the box
- Control how tapable cells appear via showTapCellAsButton boolean property
- Restrict tapables to a certain column via tapableColumns property
## 1.2.1
- Few null checks added
15 changes: 12 additions & 3 deletions example/lib/main.dart
Expand Up @@ -37,8 +37,8 @@ class _MyHomePageState extends State<MyHomePage> {
// HERE IN THIS EXAMPLE WE ARE GENERATING 2 COLUMN TABLE
Points points = Points();
List<Points> listOfPoints = [
Points(xcorr: '', ycorr: ''),
Points(xcorr: '', ycorr: ''),
Points(xcorr: '1', ycorr: '2'),
Points(xcorr: '6', ycorr: '5'),
];
// List<Points> listOfEnteredPoints = [];

Expand All @@ -52,7 +52,7 @@ class _MyHomePageState extends State<MyHomePage> {
child: Form(
key: _formKey,
child: Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down Expand Up @@ -82,6 +82,15 @@ class _MyHomePageState extends State<MyHomePage> {

// FLUTTABLE IMPLEMENTATION
Fluttable(
tapableColumns: [1],
showTapCellAsButton: true,
onCellTap: (value, rowIndex) {
print("cell value: $value in row $rowIndex");
},
onRowTap: (listOfValues, rowIndex) {
print("row value: $listOfValues in row $rowIndex");
},
editable: false,
defaultValidator: FluttableVal.POSINT,
key: tableKey,
contentPadding: 30,
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Expand Up @@ -63,7 +63,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.2.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down

0 comments on commit 015f1c3

Please sign in to comment.