Remove share package
This commit is contained in:
parent
7931a301e7
commit
e19bb51893
|
|
@ -4,7 +4,6 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:flutter_share/flutter_share.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||
|
|
@ -23,6 +22,7 @@ import 'package:invoiceninja_flutter/utils/localization.dart';
|
|||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:share/share.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class DocumentGrid extends StatelessWidget {
|
||||
|
|
@ -221,10 +221,7 @@ class DocumentTile extends StatelessWidget {
|
|||
|
||||
await File(filePath)
|
||||
.writeAsBytes(response.bodyBytes);
|
||||
await FlutterShare.shareFile(
|
||||
title: '${localization.name}',
|
||||
filePath: filePath,
|
||||
);
|
||||
await Share.shareFiles([filePath]);
|
||||
}
|
||||
} else if (value == localization.delete) {
|
||||
confirmCallback(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
|||
import 'dart:convert';
|
||||
import 'dart:io' as file;
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:flutter_share/flutter_share.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart';
|
||||
|
|
@ -25,6 +24,7 @@ import 'package:native_pdf_view/native_pdf_view.dart';
|
|||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:invoiceninja_flutter/utils/web_stub.dart'
|
||||
if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
|
||||
import 'package:share/share.dart';
|
||||
|
||||
class ClientPdfView extends StatefulWidget {
|
||||
const ClientPdfView({
|
||||
|
|
@ -329,8 +329,7 @@ class _ClientPdfViewState extends State<ClientPdfView> {
|
|||
'${directory.path}/${client.number}.pdf';
|
||||
final pdfData = file.File(filePath);
|
||||
pdfData.writeAsBytes(_response.bodyBytes);
|
||||
await FlutterShare.shareFile(
|
||||
title: fileName, filePath: filePath);
|
||||
await Share.shareFiles([filePath]);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
|||
import 'dart:convert';
|
||||
import 'dart:io' as file;
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:flutter_share/flutter_share.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart';
|
||||
|
|
@ -26,6 +25,7 @@ import 'package:path_provider/path_provider.dart';
|
|||
import 'package:invoiceninja_flutter/utils/web_stub.dart'
|
||||
if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
|
||||
import 'package:invoiceninja_flutter/ui/invoice/invoice_pdf_vm.dart';
|
||||
import 'package:share/share.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class InvoicePdfView extends StatefulWidget {
|
||||
|
|
@ -274,8 +274,7 @@ class _InvoicePdfViewState extends State<InvoicePdfView> {
|
|||
'${directory.path}/${invoice.invoiceId}.pdf';
|
||||
final pdfData = file.File(filePath);
|
||||
pdfData.writeAsBytes(_response.bodyBytes);
|
||||
await FlutterShare.shareFile(
|
||||
title: fileName, filePath: filePath);
|
||||
await Share.shareFiles([filePath]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io' as file;
|
||||
import 'package:flutter_share/flutter_share.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -38,6 +37,7 @@ import 'package:path_provider/path_provider.dart';
|
|||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja_flutter/utils/web_stub.dart'
|
||||
if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
|
||||
import 'package:share/share.dart';
|
||||
|
||||
import 'credit_report.dart';
|
||||
|
||||
|
|
@ -424,10 +424,7 @@ class ReportsScreenVM {
|
|||
final filePath = '${directory.path}/$filename';
|
||||
final csvFile = file.File(filePath);
|
||||
csvFile.writeAsString(csvData);
|
||||
await FlutterShare.shareFile(
|
||||
title: filename,
|
||||
//text: 'Example share text',
|
||||
filePath: filePath);
|
||||
await Share.shareFiles([filePath]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ dependencies:
|
|||
flutter_typeahead:
|
||||
git:
|
||||
url: git://github.com/hillelcoren/flutter_typeahead.git
|
||||
flutter_share: ^2.0.0
|
||||
package_info: ^2.0.2
|
||||
rounded_loading_button: ^2.0.5
|
||||
version: ^2.0.0
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ dependencies:
|
|||
flutter_typeahead:
|
||||
git:
|
||||
url: git://github.com/hillelcoren/flutter_typeahead.git
|
||||
flutter_share: ^2.0.0
|
||||
package_info: ^2.0.2
|
||||
rounded_loading_button: ^2.0.5
|
||||
version: ^2.0.0
|
||||
|
|
|
|||
|
|
@ -380,13 +380,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.8.2"
|
||||
flutter_share:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_share
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
flutter_slidable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ dependencies:
|
|||
flutter_typeahead:
|
||||
git:
|
||||
url: git://github.com/hillelcoren/flutter_typeahead.git
|
||||
flutter_share: ^2.0.0
|
||||
package_info: ^2.0.2
|
||||
rounded_loading_button: ^2.0.5
|
||||
version: ^2.0.0
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ dependencies:
|
|||
flutter_typeahead:
|
||||
git:
|
||||
url: git://github.com/hillelcoren/flutter_typeahead.git
|
||||
flutter_share: ^2.0.0
|
||||
package_info: ^2.0.2
|
||||
rounded_loading_button: ^2.0.5
|
||||
version: ^2.0.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue