From 3acba2ebc111ca07bad67f49ec03ef77107e3390 Mon Sep 17 00:00:00 2001 From: CodeNameAkshay Date: Sat, 6 Jun 2020 02:04:59 +0530 Subject: [PATCH] share images done Added #24 --- android/app/src/main/AndroidManifest.xml | 39 ++-- android/app/src/main/res/filepaths.xml | 4 + lib/picnote_page.dart | 18 +- pubspec.lock | 283 +++++++++++++++++++++++ pubspec.yaml | 4 +- 5 files changed, 326 insertions(+), 22 deletions(-) create mode 100644 android/app/src/main/res/filepaths.xml diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 31ad60b..16eba24 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,31 +1,38 @@ - + - - + + + + - + + diff --git a/android/app/src/main/res/filepaths.xml b/android/app/src/main/res/filepaths.xml new file mode 100644 index 0000000..0c2e8a7 --- /dev/null +++ b/android/app/src/main/res/filepaths.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lib/picnote_page.dart b/lib/picnote_page.dart index 3f8992a..ac68f87 100644 --- a/lib/picnote_page.dart +++ b/lib/picnote_page.dart @@ -1,7 +1,5 @@ import 'dart:async'; -// import 'dart:convert'; import 'dart:io'; -// import 'dart:typed_data'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -13,7 +11,7 @@ import 'package:multi_screen/SqliteHandler.dart'; import 'package:multi_screen/photoViewer.dart'; import 'package:multi_screen/utility.dart'; import 'package:multi_screen/options_sheet.dart'; -import 'package:share/share.dart'; +// import 'package:flutter_share_content/flutter_share_content.dart'; import 'package:flutter/services.dart'; class PhotoPage extends StatefulWidget { @@ -392,7 +390,19 @@ class _PhotoPageState extends State { case moreOptions.share: { if (_editableNote.content.isNotEmpty) { - Share.share("${_editableNote.title}\n${_editableNote.content}"); + // FlutterShareContent.shareContent( + // imageUrl: '${widget.noteInEditing.content}', + // title: '${widget.noteInEditing.title}', + // msg: '${widget.noteInEditing.title}'); + // Share.shareFile( + // File('${widget.noteInEditing.content}'), + // subject: '${widget.noteInEditing.title}', + // text: '${widget.noteInEditing.title}', + // ); + // FlutterShareFile.shareImage( + // widget.noteInEditing.content, + // '${widget.noteInEditing.title}.png', + // '${widget.noteInEditing.title}'); } break; } diff --git a/pubspec.lock b/pubspec.lock index 88b89f1..abe9261 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.39.10" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" async: dependency: transitive description: @@ -50,6 +78,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.11" crypto: dependency: transitive description: @@ -57,6 +92,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.4" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" cupertino_icons: dependency: "direct main" description: @@ -71,11 +113,23 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_driver: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -90,6 +144,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + flutter_share_content: + dependency: "direct main" + description: + name: flutter_share_content + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.1+1" flutter_staggered_grid_view: dependency: "direct main" description: @@ -114,6 +175,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "8.8.1" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" gallery_saver: dependency: "direct main" description: @@ -121,6 +187,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" google_fonts: dependency: "direct main" description: @@ -128,6 +201,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+3" http: dependency: transitive description: @@ -135,6 +215,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" http_parser: dependency: transitive description: @@ -163,6 +250,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.16.1" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" line_awesome_icons: dependency: "direct main" description: @@ -170,6 +278,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4+2" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.4" matcher: dependency: transitive description: @@ -184,6 +299,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.8" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + multi_server_socket: + dependency: transitive + description: + name: multi_server_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + node_interop: + dependency: transitive + description: + name: node_interop + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + node_io: + dependency: transitive + description: + name: node_io + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.10" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" path: dependency: transitive description: @@ -247,6 +404,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.12" provider: dependency: "direct main" description: @@ -268,11 +439,53 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.4+3" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.8" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" source_span: dependency: transitive description: @@ -315,6 +528,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.5" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" synchronized: dependency: transitive description: @@ -329,6 +549,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.4" test_api: dependency: transitive description: @@ -336,6 +563,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.15" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" typed_data: dependency: transitive description: @@ -378,6 +612,55 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.4" + vm_service_client: + dependency: transitive + description: + name: vm_service_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.6+2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+15" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + webdriver: + dependency: transitive + description: + name: webdriver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.3" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" flutter: ">=1.17.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index c348a74..b27e1cb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,7 +22,6 @@ dependencies: flutter_staggered_grid_view: ^0.3.0 sqflite: ^1.3.0+1 auto_size_text: ^2.1.0 - share: ^0.6.4+3 intl: ^0.16.1 google_fonts: ^1.1.0 flutter_screenutil: ^1.1.0 @@ -32,11 +31,12 @@ dependencies: gallery_saver: ^2.0.1 url_launcher: ^5.4.10 photo_view: ^0.9.2 - + flutter_share_content: ^0.2.1+1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 provider: ^3.1.0 + share: ^0.6.4+3 dev_dependencies: flutter_driver: