Skip to content

Commit

Permalink
Remove unnecessary imports and unnecessary null check, upgraded depen…
Browse files Browse the repository at this point in the history
…dency.
  • Loading branch information
rickypid committed Feb 3, 2022
1 parent fb6f515 commit fc3bc27
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 34 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Flutter Expandable Table

## [1.0.2] - 2022-02-03
#### [@rickypid](https://github.com/rickypid)
- Remove unnecessary imports and unnecessary null check, upgraded dependency.

## [1.0.1] - 2022-01-25
#### [@rickypid](https://github.com/rickypid)
- Improved documentations.
Expand Down
30 changes: 22 additions & 8 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -61,14 +61,14 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.0"
version: "1.0.2"
flutter_scroll_shadow:
dependency: transitive
description:
name: flutter_scroll_shadow
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -87,21 +87,35 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.2"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -148,7 +162,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
typed_data:
dependency: transitive
description:
Expand All @@ -162,7 +176,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_expandable_table_example
description: A Flutter widget for create an expandable table with header and first column fixed.
version: 1.0.1
version: 1.0.2

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
17 changes: 4 additions & 13 deletions lib/src/body.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_scroll_shadow/flutter_scroll_shadow.dart';
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
import 'cell.dart';
Expand Down Expand Up @@ -48,9 +47,7 @@ class _ExpandableTableBodyState extends State<ExpandableTableBody>
firstColumn.add(
ExpandableTableCell(
child: row.firstCell,
height: row.height != null
? row.height
: ExpandableTableData.of(context).cellHeight,
height: row.height,
width: ExpandableTableData.of(context).firstColumnWidth,
verticalExpanded: rowParent != null ? rowParent.isExpanded : true,
onTap: () {
Expand All @@ -65,9 +62,7 @@ class _ExpandableTableBodyState extends State<ExpandableTableBody>
firstColumn.add(
ExpandableTableCell(
child: row.firstCell,
height: row.height != null
? row.height
: ExpandableTableData.of(context).cellHeight,
height: row.height,
width: ExpandableTableData.of(context).firstColumnWidth,
verticalExpanded: rowParent == null || rowParent.isExpanded,
onTap: () {
Expand Down Expand Up @@ -99,9 +94,7 @@ class _ExpandableTableBodyState extends State<ExpandableTableBody>
for (Widget cell in cells) {
cellsRow.add(ExpandableTableCell(
child: cell,
height: row.height != null
? row.height
: ExpandableTableData.of(context).cellHeight,
height: row.height,
width: ExpandableTableData.of(context).cellWidth,
horizontalExpanded:
ExpandableTableData.of(context).visibleColumn[x] == true,
Expand All @@ -122,9 +115,7 @@ class _ExpandableTableBodyState extends State<ExpandableTableBody>
Expanded(
child: ExpandableTableCell(
verticalExpanded: rowParent == null || rowParent.isExpanded,
height: row.height != null
? row.height
: ExpandableTableData.of(context).cellHeight,
height: row.height,
width: ExpandableTableData.of(context).cellWidth,
child: row.legend),
)
Expand Down
1 change: 0 additions & 1 deletion lib/src/expandable_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
library flutter_expandable_table;

import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter_scroll_shadow/flutter_scroll_shadow.dart';
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
import 'body.dart';
Expand Down
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -61,7 +61,7 @@ packages:
name: flutter_scroll_shadow
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -80,7 +80,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -108,7 +108,7 @@ packages:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.1"
version: "6.0.2"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -155,7 +155,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
typed_data:
dependency: transitive
description:
Expand All @@ -169,7 +169,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_expandable_table
description: A Flutter widget for create an expandable table with header and first column fixed.
version: 1.0.1
version: 1.0.2
repository: https://github.com/rickypid/flutter_expandable_table
issue_tracker: https://github.com/rickypid/flutter_expandable_table/issues

Expand All @@ -12,8 +12,8 @@ dependencies:
flutter:
sdk: flutter
linked_scroll_controller: ^0.2.0
flutter_scroll_shadow: ^1.0.0
provider: ^6.0.1
flutter_scroll_shadow: ^1.0.2
provider: ^6.0.2

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit fc3bc27

Please sign in to comment.