From f7fc1f6e3216438524afcfa1b014129e55b800eb Mon Sep 17 00:00:00 2001 From: aslight0013 Date: Wed, 3 May 2023 22:18:26 +0600 Subject: [PATCH] bug fixed --- lib/screens/dashboard/components/chart.dart | 2 +- lib/screens/dashboard/components/file_info_card.dart | 7 ++++--- lib/screens/dashboard/components/header.dart | 2 +- lib/screens/dashboard/components/my_fields.dart | 2 +- lib/screens/dashboard/components/my_files.dart | 2 +- lib/screens/dashboard/components/recent_files.dart | 4 ++-- .../dashboard/components/storage_info_card.dart | 2 +- lib/screens/dashboard/dashboard_screen.dart | 4 ++-- lib/screens/main/components/side_menu.dart | 2 +- pubspec.lock | 10 +--------- pubspec.yaml | 1 - 11 files changed, 15 insertions(+), 23 deletions(-) diff --git a/lib/screens/dashboard/components/chart.dart b/lib/screens/dashboard/components/chart.dart index bbc1109..8438fd8 100644 --- a/lib/screens/dashboard/components/chart.dart +++ b/lib/screens/dashboard/components/chart.dart @@ -29,7 +29,7 @@ class Chart extends StatelessWidget { SizedBox(height: defaultPadding), Text( "29.1", - style: Theme.of(context).textTheme.headline4!.copyWith( + style: Theme.of(context).textTheme.headlineMedium!.copyWith( color: Colors.white, fontWeight: FontWeight.w600, height: 0.5, diff --git a/lib/screens/dashboard/components/file_info_card.dart b/lib/screens/dashboard/components/file_info_card.dart index 912a597..2cde8e4 100644 --- a/lib/screens/dashboard/components/file_info_card.dart +++ b/lib/screens/dashboard/components/file_info_card.dart @@ -37,7 +37,8 @@ class FileInfoCard extends StatelessWidget { ), child: SvgPicture.asset( info.svgSrc!, - color: info.color, + colorFilter: ColorFilter.mode( + info.color ?? Colors.black, BlendMode.srcIn), ), ), Icon(Icons.more_vert, color: Colors.white54) @@ -59,14 +60,14 @@ class FileInfoCard extends StatelessWidget { "${info.numOfFiles} Files", style: Theme.of(context) .textTheme - .caption! + .bodySmall! .copyWith(color: Colors.white70), ), Text( info.totalStorage!, style: Theme.of(context) .textTheme - .caption! + .bodySmall! .copyWith(color: Colors.white), ), ], diff --git a/lib/screens/dashboard/components/header.dart b/lib/screens/dashboard/components/header.dart index c6ff261..afef168 100644 --- a/lib/screens/dashboard/components/header.dart +++ b/lib/screens/dashboard/components/header.dart @@ -23,7 +23,7 @@ class Header extends StatelessWidget { if (!Responsive.isMobile(context)) Text( "Dashboard", - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), if (!Responsive.isMobile(context)) Spacer(flex: Responsive.isDesktop(context) ? 2 : 1), diff --git a/lib/screens/dashboard/components/my_fields.dart b/lib/screens/dashboard/components/my_fields.dart index c4c7ca3..b148abf 100644 --- a/lib/screens/dashboard/components/my_fields.dart +++ b/lib/screens/dashboard/components/my_fields.dart @@ -20,7 +20,7 @@ class MyFiles extends StatelessWidget { children: [ Text( "My Files", - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), ElevatedButton.icon( style: TextButton.styleFrom( diff --git a/lib/screens/dashboard/components/my_files.dart b/lib/screens/dashboard/components/my_files.dart index 77b828d..3c9226d 100644 --- a/lib/screens/dashboard/components/my_files.dart +++ b/lib/screens/dashboard/components/my_files.dart @@ -20,7 +20,7 @@ class MyFiles extends StatelessWidget { children: [ Text( "My Files", - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), ElevatedButton.icon( style: TextButton.styleFrom( diff --git a/lib/screens/dashboard/components/recent_files.dart b/lib/screens/dashboard/components/recent_files.dart index 47edb16..8870c9f 100644 --- a/lib/screens/dashboard/components/recent_files.dart +++ b/lib/screens/dashboard/components/recent_files.dart @@ -1,5 +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'; @@ -23,7 +23,7 @@ class RecentFiles extends StatelessWidget { children: [ Text( "Recent Files", - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), SizedBox( width: double.infinity, diff --git a/lib/screens/dashboard/components/storage_info_card.dart b/lib/screens/dashboard/components/storage_info_card.dart index d1c8f38..92b182d 100644 --- a/lib/screens/dashboard/components/storage_info_card.dart +++ b/lib/screens/dashboard/components/storage_info_card.dart @@ -48,7 +48,7 @@ class StorageInfoCard extends StatelessWidget { "$numOfFiles Files", style: Theme.of(context) .textTheme - .caption! + .bodySmall! .copyWith(color: Colors.white70), ), ], diff --git a/lib/screens/dashboard/dashboard_screen.dart b/lib/screens/dashboard/dashboard_screen.dart index d6ac92a..b368a52 100644 --- a/lib/screens/dashboard/dashboard_screen.dart +++ b/lib/screens/dashboard/dashboard_screen.dart @@ -29,8 +29,8 @@ class DashboardScreen extends StatelessWidget { MyFiles(), SizedBox(height: defaultPadding), RecentFiles(), - // if (Responsive.isMobile(context)) - // SizedBox(height: defaultPadding), + if (Responsive.isMobile(context)) + SizedBox(height: defaultPadding), if (Responsive.isMobile(context)) StarageDetails(), ], ), diff --git a/lib/screens/main/components/side_menu.dart b/lib/screens/main/components/side_menu.dart index a21065c..d30255e 100644 --- a/lib/screens/main/components/side_menu.dart +++ b/lib/screens/main/components/side_menu.dart @@ -79,7 +79,7 @@ class DrawerListTile extends StatelessWidget { horizontalTitleGap: 0.0, leading: SvgPicture.asset( svgSrc, - color: Colors.white54, + colorFilter: ColorFilter.mode(Colors.white54, BlendMode.srcIn), height: 16, ), title: Text( diff --git a/pubspec.lock b/pubspec.lock index 7c02a28..632f7d1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -65,14 +65,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" - data_table_2: - dependency: "direct main" - description: - name: data_table_2 - sha256: daea1a67128e88b6b5537ee0752c67ecdc2fba9cd9303b3554361c648549618d - url: "https://pub.dev" - source: hosted - version: "2.4.2" equatable: dependency: transitive description: @@ -418,4 +410,4 @@ packages: version: "6.2.2" sdks: dart: ">=2.19.0 <3.0.0" - flutter: ">=3.7.0" + flutter: ">=3.7.0-0" diff --git a/pubspec.yaml b/pubspec.yaml index 4780da2..d978d2f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,7 +32,6 @@ dependencies: flutter_svg: ^2.0.5 fl_chart: ^0.62.0 provider: ^6.0.5 - data_table_2: ^2.0.3 dev_dependencies: flutter_test: