Only show download where supported
This commit is contained in:
parent
ae1b5bb63a
commit
ed602e8216
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ class ReportsScreen extends StatelessWidget {
|
|||
},
|
||||
);
|
||||
}),
|
||||
if (supportsFileDownload())
|
||||
AppTextButton(
|
||||
label: localization.export,
|
||||
isInHeader: true,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue