diff --git a/lib/ui/app/tables/app_paginated_data_table.dart b/lib/ui/app/tables/app_paginated_data_table.dart index c766dbc5c..bb695af08 100644 --- a/lib/ui/app/tables/app_paginated_data_table.dart +++ b/lib/ui/app/tables/app_paginated_data_table.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart' hide DataRow, DataCell, DataColumn; import 'package:flutter/widgets.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/gestures.dart' show DragStartBehavior; -import 'package:invoiceninja_flutter/ui/app/app_scrollbar.dart'; import 'package:invoiceninja_flutter/ui/app/tables/app_data_table.dart'; import 'package:invoiceninja_flutter/ui/app/tables/app_data_table_source.dart'; diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index cc91c7536..68833edf9 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -248,13 +248,14 @@ class ReportsScreen extends StatelessWidget { }, ); }), - AppTextButton( - label: localization.export, - isInHeader: true, - onPressed: () { - viewModel.onExportPressed(context); - }, - ), + if (supportsFileDownload()) + AppTextButton( + label: localization.export, + isInHeader: true, + onPressed: () { + viewModel.onExportPressed(context); + }, + ), ], if (isMobile(context) || !state.prefState.isHistoryVisible) Builder( diff --git a/lib/utils/platforms.dart b/lib/utils/platforms.dart index 1391d182f..73ac5c79e 100644 --- a/lib/utils/platforms.dart +++ b/lib/utils/platforms.dart @@ -11,6 +11,12 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:invoiceninja_flutter/utils/web_stub.dart' if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart'; +// TODO remove this function +bool supportsFileDownload() => !isDesktopOS(); + +// TODO remove this function +bool supportsFileUpload() => !isMacOS() && !isLinux(); + bool isDesktopOS() => isMacOS() || isWindows() || isLinux(); bool isMobileOS() => isAndroid() || isIOS();