From 1843af45232a89593ab1bffe1df6eec54cb4922a Mon Sep 17 00:00:00 2001 From: aslight0013 Date: Sat, 19 Jun 2021 13:13:29 +0300 Subject: [PATCH] datatable2 installed and datatable overflow fixed, horizontal scroll adding through datatable2 --- lib/screens/dashboard/components/recent_files.dart | 5 +++-- pubspec.lock | 7 +++++++ pubspec.yaml | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/screens/dashboard/components/recent_files.dart b/lib/screens/dashboard/components/recent_files.dart index 5043cdf..3a50295 100644 --- a/lib/screens/dashboard/components/recent_files.dart +++ b/lib/screens/dashboard/components/recent_files.dart @@ -1,4 +1,5 @@ import 'package:admin/models/RecentFile.dart'; +import 'package:data_table_2/data_table_2.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -26,9 +27,9 @@ class RecentFiles extends StatelessWidget { ), SizedBox( width: double.infinity, - child: DataTable( - horizontalMargin: 0, + child: DataTable2( columnSpacing: defaultPadding, + minWidth: 600, columns: [ DataColumn( label: Text("File Name"), diff --git a/pubspec.lock b/pubspec.lock index b2f5a56..4e0a3ef 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,6 +57,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + data_table_2: + dependency: "direct main" + description: + name: data_table_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" equatable: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c36f432..a00bff1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,6 +32,7 @@ dependencies: flutter_svg: ^0.22.0 fl_chart: ^0.36.1 provider: ^5.0.0 + data_table_2: ^2.0.3 dev_dependencies: flutter_test: