Skip to content

Commit

Permalink
Merge pull request OpenFlutter#51 from OpenFlutter/development
Browse files Browse the repository at this point in the history
Setup lint and refactor the code
  • Loading branch information
jigarfumakiya authored Aug 19, 2021
2 parents 093146c + 15771d9 commit d4a97d2
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 173 deletions.
40 changes: 20 additions & 20 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# flutter_share_me

[![pub package](https://img.shields.io/pub/v/flutter_share_me.svg)](https://pub.dartlang.org/packages/flutter_share_me)
[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)

Flutter Plugin for sharing contents to social media.

Expand Down
17 changes: 17 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include: package:lint/analysis_options_package.yaml

linter:
rules:
# Use parameter order as in json response
always_put_required_named_parameters_first: false
# Util classes are awesome!
avoid_classes_with_only_static_members: false
# Make constructors the first thing in every class
sort_constructors_first: true
# The new tabs vs. spaces. Choose wisely
prefer_single_quotes: true
prefer_double_quotes: false
public_member_api_docs: true
always_specify_types: true

lines_longer_than_80_chars: false
1 change: 1 addition & 0 deletions example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_share_me","path":"/Users/jigafumakiya/Documents/Jigar/plugin/open_flutter_share_me/flutter_share_me/","dependencies":[]},{"name":"image_picker","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.8.3+2/","dependencies":[]},{"name":"path_provider","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.2/","dependencies":[]},{"name":"flutter_share_me","path":"/Users/jigafumakiya/Documents/Jigar/plugin/open_flutter_share_me/flutter_share_me/","dependencies":[]},{"name":"image_picker","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.8.3+2/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.2/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.3/","dependencies":[]}],"web":[{"name":"image_picker_for_web","path":"/Users/jigafumakiya/Documents/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_for_web-2.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_share_me","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-08-19 18:46:36.035591","version":"2.2.3"}
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
11 changes: 5 additions & 6 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/lizhuoyuan/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/lizhuoyuan/Development/Project/flutter_share_me/example"
export "FLUTTER_ROOT=/Users/jigafumakiya/Documents/FlutterSDK/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/jigafumakiya/Documents/Jigar/plugin/open_flutter_share_me/flutter_share_me/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=/Users/lizhuoyuan/Development/Project/flutter_share_me/example/lib/main.dart"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=100"
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/lizhuoyuan/Development/Project/flutter_share_me/example/.dart_tool/package_config.json"
export "PACKAGE_CONFIG=.packages"
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = HW92UC978N;
DEVELOPMENT_TEAM = CS942AL422;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -484,7 +484,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = HW92UC978N;
DEVELOPMENT_TEAM = CS942AL422;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -507,7 +507,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = HW92UC978N;
DEVELOPMENT_TEAM = CS942AL422;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
8 changes: 6 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
String msg = 'hello,this is my github:https://github.com/lizhuoyuan';
File? file;
ImagePicker picker = ImagePicker();

Expand Down Expand Up @@ -94,7 +93,12 @@ class _MyAppState extends State<MyApp> {
response = await flutterShareMe.shareToTwitter(url: url, msg: msg);
break;
case Share.whatsapp:
response = await flutterShareMe.shareToWhatsApp(msg: msg, imagePath: file!.path);
if(file!=null){
response = await flutterShareMe.shareToWhatsApp(msg: msg, imagePath: file!.path);
}else{
response = await flutterShareMe.shareToWhatsApp(msg: msg);
}

break;
case Share.whatsapp_business:
response = await flutterShareMe.shareToWhatsApp(msg: msg);
Expand Down
Loading

0 comments on commit d4a97d2

Please sign in to comment.