Преглед на файлове

1.优化分享

tags/0.0.4+7
“yanghuaxuan” преди 3 години
родител
ревизия
3ec77f2ab9
променени са 5 файла, в които са добавени 25 реда и са изтрити 3 реда
  1. +2
    -2
      example/android/app/build.gradle
  2. +6
    -0
      example/lib/main.dart
  3. +10
    -0
      example/pubspec.yaml
  4. +5
    -0
      lib/widgets/share/models/share_data_model.dart
  5. +2
    -1
      lib/widgets/share/share_alert.dart

+ 2
- 2
example/android/app/build.gradle Целия файл

@@ -112,9 +112,9 @@ android {
// // 智夜生活
// zhiying {
// applicationId "cn.zhios.zhiying"
// versionCode 28
// versionCode 31
// dimension "app"
// versionName '1.2.28'
// versionName '1.2.31'
// // 签名信息
// signingConfig signingConfigs.zhiying
// }


+ 6
- 0
example/lib/main.dart Целия файл

@@ -15,6 +15,9 @@ import 'package:zhiying_comm/zhiying_comm.dart';

import 'util/localizations_delegate.dart';
import 'package:zhiying_base_widget/utils/mob_push_util.dart';
import 'package:zhiying_business_college/register.dart';
import 'package:zhiying_new_user_free/register.dart';
import 'package:zhiying_wechat_teacher/register.dart';

void main() {
FlutterError.onError = (FlutterErrorDetails details) {
@@ -49,6 +52,9 @@ class _MyAppState extends State<MyApp> {
super.initState();
print('初始化~~~~');
BaseWidgetRegister.init();
BusinessCollageRegister.init();
NewUserFreeRegister.init();
WeChatTeachRegister.init();
print('初始化百川');
FlutterAlibc.initAlibc(version: "", appName: "").then((result) {
print("白川" + '${result.errorCode} ${result.errorMessage}');


+ 10
- 0
example/pubspec.yaml Целия файл

@@ -24,6 +24,16 @@ dev_dependencies:

zhiying_comm:
path: ../../zhiying_comm
zhiying_new_user_free:
path: ../../zhiying_new_user_free
zhiying_business_college:
path: ../../zhiying_business_college
#微信导师
zhiying_wechat_teacher:
#path: ../zhiying_wechat_teacher
git:
ref: 0.0.1+1
url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_wechat_teacher.git

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec


+ 5
- 0
lib/widgets/share/models/share_data_model.dart Целия файл

@@ -1,5 +1,10 @@
import 'dart:typed_data';

///
/// 1.纯文本content
/// 2.分享链接 title image url ,content(可选)
/// 3.纯图片/海报 poster/image
///
class ShareDataModel {
String title;
String content;


+ 2
- 1
lib/widgets/share/share_alert.dart Целия файл

@@ -252,7 +252,7 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
widget.model?.title ?? '',
widget.model?.content ?? '',
Platform.isIOS ? widget.model.image : null,
Platform.isAndroid ? widget.model.image.first : null,
Platform.isAndroid ? widget?.model?.image?.first : null,
null,
widget.model.url,
null,
@@ -263,6 +263,7 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
);
}
SharesdkPlugin.share(plateform, params, (SSDKResponseState state, Map userdata, Map contentEntity, SSDKError error) {
print(error);
if (state == SSDKResponseState.Fail) {
Fluttertoast.showToast(msg: '分享失败');
} else if (state == SSDKResponseState.Success) {


Зареждане…
Отказ
Запис