Commit 0968a395 authored by 林生雨's avatar 林生雨

fix

parent ac0a214c
...@@ -75,7 +75,7 @@ class MainActivity : FlutterActivity() { ...@@ -75,7 +75,7 @@ class MainActivity : FlutterActivity() {
map.put("buildConfig", "debug") map.put("buildConfig", "debug")
map.put("provider", "com.example.gmalpha_flutter") map.put("provider", "com.example.gmalpha_flutter")
//HERE //HERE
// map.put("proxy", "172.30.9.84:6666"); // map.put("proxy", "172.30.9.137:6666");
result.success(map) result.success(map)
} else if (call.method == "UPLOAD_IMG") { } else if (call.method == "UPLOAD_IMG") {
result.success("2019/10/17/1156/44dbb13ac6d9"); result.success("2019/10/17/1156/44dbb13ac6d9");
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<paths> <paths>
<!--path:需要临时授权访问的路径(.代表所有路径)--> <!--path:需要临时授权访问的路径(.代表所有路径)-->
<!--name:就是你给这个访问路径起个名字--> <!--name:就是你给这个访问路径起个名字-->
<external-path name="InstructiveRide" path="."/> <external-path name="LLL" path="."/>
</paths> </paths>
\ No newline at end of file
...@@ -136,8 +136,18 @@ function android_publish(){ ...@@ -136,8 +136,18 @@ function android_publish(){
git push git push
} }
function copyAAR(){
cp -r /Users/apple/lsy/gmalpha_flutter/build/flutter_boost/outputs/aar/flutter_boost-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/flutter_boost.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/gengmei_flutter_plugin/outputs/aar/gengmei_flutter_plugin-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/gengmei_flutter_plugin.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/path_provider/outputs/aar/path_provider-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/path_provider.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/sqflite/outputs/aar/sqflite-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/sqflite.aar
cp -r /Users/apple/lsy/gmalpha_flutter/build/xservice_kit/outputs/aar/xservice_kit-${suff}.aar /Users/apple/lsy/MergeTest/app/libs/xservice_kit.aar
}
#====upload #====upload
function upload_android_aar(){ function upload_android_aar(){
cd /Users/apple/lsy/MergeTest cd /Users/apple/lsy/MergeTest
./gradlew clean ./gradlew clean
./gradlew assembleRelease ./gradlew assembleRelease
...@@ -250,11 +260,12 @@ mkdir /Users/apple/lsy/aar_update/androd${message}/ ...@@ -250,11 +260,12 @@ mkdir /Users/apple/lsy/aar_update/androd${message}/
mkdir /Users/apple/lsy/aar_update/ios${message}/ mkdir /Users/apple/lsy/aar_update/ios${message}/
clean clean
android_apk #android_apk
#android #android
#android_publish #android_publish
#copyAAR
#upload_android_aar #upload_android_aar
#ios ios
#ios_publish #ios_publish
#notifyDingDing #notifyDingDing
......
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="11.5" fill="black" fill-opacity="0.2" stroke="white"/>
</svg>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.25 12C23.25 18.2132 18.2132 23.25 12 23.25C5.7868 23.25 0.75 18.2132 0.75 12C0.75 5.7868 5.7868 0.75 12 0.75C18.2132 0.75 23.25 5.7868 23.25 12Z" fill="white" stroke="white" stroke-width="1.5"/>
<path d="M6.97825 12.3108L10.4976 15.8302L17.6353 8.69248" stroke="#323232" stroke-width="1.5"/>
</svg>
<svg width="93" height="93" viewBox="0 0 93 93" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="93" height="93" fill="white"/>
<path d="M32.5 59.5V36.5H40L41.5 33.5H54L55.5 36.5H63.5V59.5H32.5Z" stroke="#323232" stroke-width="2"/>
<circle cx="48" cy="47" r="6" stroke="#323232" stroke-width="2"/>
<circle cx="58" cy="42" r="2" fill="#323232"/>
</svg>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
FlutterEventChannel* flutterEvent=[FlutterEventChannel FlutterEventChannel* flutterEvent=[FlutterEventChannel
eventChannelWithName:@"flutter_channel_event" binaryMessenger:controller]; eventChannelWithName:@"flutter_channel_event" binaryMessenger:controller];
[flutterEvent setStreamHandler:self]; [flutterEvent setStreamHandler:self];
[buryChannel setMethodCallHandler:^(FlutterMethodCall* call, [buryChannel setMethodCallHandler:^(FlutterMethodCall* call,
FlutterResult result) { FlutterResult result) {
......
...@@ -11,6 +11,6 @@ import 'package:gmalpha_flutter/Annotations/anno/Router.dart'; ...@@ -11,6 +11,6 @@ import 'package:gmalpha_flutter/Annotations/anno/Router.dart';
@Router("albumModel", AlbumRouterImpl, true) @Router("albumModel", AlbumRouterImpl, true)
abstract class AlbumRouter implements RouterBaser { abstract class AlbumRouter implements RouterBaser {
Widget getAlbumPage(String provider, bool showCamera, int bigSelectImage, Widget getAlbumPage(String provider, bool showCamera, int bigSelectImage,
List<String> selectedImages); List<String> selectedImages, bool fromNative, String fromPage,
{int maxVideoCount = 0, videoSelectPath = null, iosPushedPage = null});
} }
...@@ -9,8 +9,10 @@ import 'package:gmalpha_flutter/AlbumModel/page/album/AlbumPage.dart'; ...@@ -9,8 +9,10 @@ import 'package:gmalpha_flutter/AlbumModel/page/album/AlbumPage.dart';
class AlbumRouterImpl implements AlbumRouter { class AlbumRouterImpl implements AlbumRouter {
@override @override
Widget getAlbumPage(String provider, Widget getAlbumPage(String provider, bool showCamera, int bigSelectSize,
bool showCamera, int bigSelectSize, List<String> selectedImages) { List<String> selectedImages, bool fromNative, String fromPage,
return AlbumPage(provider,showCamera, bigSelectSize, selectedImages); {int maxVideoCount = 0, videoSelectPath , iosPushedPage }) {
return AlbumPage(provider, showCamera, bigSelectSize, selectedImages,
fromNative, maxVideoCount, videoSelectPath, fromPage,iosPushedPage);
} }
} }
...@@ -11,6 +11,7 @@ import 'package:gengmei_flutter_plugin/ScanImagePlugn.dart'; ...@@ -11,6 +11,7 @@ import 'package:gengmei_flutter_plugin/ScanImagePlugn.dart';
import 'package:gengmei_flutter_plugin/gengmei_flutter_plugin.dart'; import 'package:gengmei_flutter_plugin/gengmei_flutter_plugin.dart';
import 'package:gmalpha_flutter/AlbumModel/bean/DirBean.dart'; import 'package:gmalpha_flutter/AlbumModel/bean/DirBean.dart';
import 'package:gmalpha_flutter/AlbumModel/repository/AlbumRepository.dart'; import 'package:gmalpha_flutter/AlbumModel/repository/AlbumRepository.dart';
import 'package:gmalpha_flutter/commonModel/GMBase.dart';
import 'package:gmalpha_flutter/commonModel/live/BaseModel.dart'; import 'package:gmalpha_flutter/commonModel/live/BaseModel.dart';
import 'package:gmalpha_flutter/commonModel/live/LiveData.dart'; import 'package:gmalpha_flutter/commonModel/live/LiveData.dart';
import 'package:gmalpha_flutter/commonModel/toast/toast.dart'; import 'package:gmalpha_flutter/commonModel/toast/toast.dart';
...@@ -28,6 +29,7 @@ class AlbumModel extends BaseModel { ...@@ -28,6 +29,7 @@ class AlbumModel extends BaseModel {
Map<String, List<ScanImageItem>> _mainValue = Map(); Map<String, List<ScanImageItem>> _mainValue = Map();
List<String> _selectList = List(); List<String> _selectList = List();
List<String> _selectVideoList = List();
String _nowDirName = MainDir; String _nowDirName = MainDir;
StreamSubscription _listen; StreamSubscription _listen;
bool showCamera = true; bool showCamera = true;
...@@ -49,37 +51,54 @@ class AlbumModel extends BaseModel { ...@@ -49,37 +51,54 @@ class AlbumModel extends BaseModel {
bool showPop = false; bool showPop = false;
List<DirBean> _dirList = List(); List<DirBean> _dirList = List();
final bool fromNative;
int maxVideoCount;
final String fromPage;
final String iosPushedPage;
get dirList => _dirList; get dirList => _dirList;
AlbumModel( AlbumModel(
this.provider, this.showCamera, int maxCount, List<String> selectedList) { this.provider,
this.showCamera,
int maxCount,
List<String> selectedList,
this.fromNative,
int maxVideoCount,
List<String> videoSelectPath,
this.fromPage,
this.iosPushedPage) {
print("======>>>>>${selectedList} ${videoSelectPath} <<<<<=====");
this.maxVideoCount = maxVideoCount;
this._maxCount = maxCount; this._maxCount = maxCount;
if (selectedList != null && !selectedList.isEmpty) { if (selectedList != null && !selectedList.isEmpty) {
this._selectList.clear(); this._selectList.clear();
this._selectList.addAll(selectedList); this._selectList.addAll(selectedList);
} }
if (videoSelectPath != null && !videoSelectPath.isEmpty) {
this._selectVideoList.clear();
this._selectVideoList.addAll(videoSelectPath);
}
} }
void _onEvent(Object event) { void _onEvent(Object event) {
var map = (event as Map); var map = (event as Map);
// var list = map[_nowDirName]; if (_mainValue == null || _mainValue.length == 0) {
_mainValue.forEach((k, itemList) { _mainValue = map;
var key = map[k]; } else {
if (key != null) { _mainValue.forEach((k, itemList) {
for (int i = 0; i < itemList.length; i++) { var key = map[k];
if (key[i] == null) { if (key != null) {
continue; for (int i = 0; i < itemList.length; i++) {
} if (key[i] == null) {
if (itemList[i].path == null) { continue;
}
itemList[i].path = key[i]["path"]; itemList[i].path = key[i]["path"];
}
if (itemList[i].realPath == null) {
itemList[i].realPath = key[i]["realPath"]; itemList[i].realPath = key[i]["realPath"];
} }
} }
} });
}); }
albumLive.notifyView(_mainValue[_nowDirName]); albumLive.notifyView(_mainValue[_nowDirName]);
} }
...@@ -88,12 +107,15 @@ class AlbumModel extends BaseModel { ...@@ -88,12 +107,15 @@ class AlbumModel extends BaseModel {
} }
void initScanImages(BuildContext context) { void initScanImages(BuildContext context) {
_listen = GengmeiFlutterPlugin.phoneImagesEvent if (Platform.isAndroid) {
.receiveBroadcastStream() _listen = GengmeiFlutterPlugin.phoneImagesEvent
.listen(_onEvent, onError: _onError); .receiveBroadcastStream()
.listen(_onEvent, onError: _onError);
}
AlbumRepository.getInstance().scanPhoneImg().listen((value) { AlbumRepository.getInstance().scanPhoneImg().listen((value) {
if (value != null) { if (value != null) {
_mainValue = value; _mainValue = value;
selectSizeLive.notifyView(_selectList.length + _selectVideoList.length);
value.forEach((key, eachValue) { value.forEach((key, eachValue) {
if (eachValue != null && !eachValue.isEmpty) { if (eachValue != null && !eachValue.isEmpty) {
if (key == MainDir) { if (key == MainDir) {
...@@ -129,16 +151,40 @@ class AlbumModel extends BaseModel { ...@@ -129,16 +151,40 @@ class AlbumModel extends BaseModel {
GengmeiFlutterPlugin.quitPage(); GengmeiFlutterPlugin.quitPage();
} }
select(int index) {}
bool isSelect(int index) { bool isSelect(int index) {
bool haveIt = false; bool haveIt = false;
if (_selectList.isEmpty) { if (_selectList.isEmpty) {
return false; return false;
} }
_selectList.forEach((value) { _selectList.forEach((value) {
if (value == albumLive.data[index].realPath) { if (Platform.isAndroid) {
haveIt = true; if (value == albumLive.data[index].realPath) {
haveIt = true;
}
} else {
if (value == albumLive.data[index].path) {
haveIt = true;
}
}
});
return haveIt;
}
bool isSelectVideo(int index) {
bool haveIt = false;
if (_selectVideoList.isEmpty) {
return false;
}
_selectVideoList.forEach((value) {
if (Platform.isAndroid) {
if (value == albumLive.data[index].realPath) {
haveIt = true;
}
} else {
if (value == albumLive.data[index].path) {
haveIt = true;
}
} }
}); });
return haveIt; return haveIt;
...@@ -148,41 +194,152 @@ class AlbumModel extends BaseModel { ...@@ -148,41 +194,152 @@ class AlbumModel extends BaseModel {
return _selectList.length == _maxCount; return _selectList.length == _maxCount;
} }
void clickItem(BuildContext context, int index) { bool isFullSelectVideo() {
String path = albumLive.data[index].realPath; return _selectVideoList.length == maxVideoCount;
}
bool isVideo(int index) {
return albumLive.data[index].isVideo;
}
if (!_selectList.contains(path)) { void clickItem(BuildContext context, int index) {
if (_selectList.length >= _maxCount) { String path;
Toast.show(context, "最多选择${_maxCount}张图片"); if (Platform.isAndroid) {
return; path = albumLive.data[index].realPath;
} else {
path = albumLive.data[index].path;
}
if (maxVideoCount > 0 && albumLive.data[index].isVideo) {
if (!_selectVideoList.contains(path)) {
if (_selectVideoList.length >= maxVideoCount) {
Toast.show(context, "最多选择${maxVideoCount}个视频");
return;
}
_selectVideoList.add(path);
} else {
_selectVideoList.remove(path);
} }
_selectList.add(path);
} else { } else {
_selectList.remove(path); if (!_selectList.contains(path)) {
if (_selectList.length >= _maxCount) {
Toast.show(context, "最多选择${_maxCount}张图片");
return;
}
_selectList.add(path);
} else {
_selectList.remove(path);
}
} }
albumLive.notifyView(albumLive.data); albumLive.notifyView(albumLive.data);
selectSizeLive.notifyView(_selectList.length); selectSizeLive.notifyView(_selectList.length + _selectVideoList.length);
} }
void onNext(BuildContext context) { void onNext(BuildContext context) {
if (_selectList.isEmpty) { if (_selectList.isEmpty && _selectVideoList.isEmpty) {
Navigator.pop(context, null); Navigator.pop(context, null);
} else { } else {
Navigator.pop(context, _selectList); if (fromNative) {
if (Platform.isAndroid) {
albumResult({"image": _selectList, "video": _selectVideoList});
} else {
iosAlbum(_selectList, context, (image) {
iosAlbum(_selectVideoList, context, (video) {
var newImages = List<String>();
for (String item in _selectList) {
for (Map real in image) {
var map = Map<String, String>.from(real);
if (map["path"] == item) {
newImages.add(map["realImagePath"]);
break;
}
}
}
var newVideos = List<String>();
for (String item in _selectVideoList) {
for (Map real in video) {
var map = Map<String, String>.from(real);
if (map["path"] == item) {
newVideos.add(map["realVideoPath"]);
break;
}
}
}
print("IM ${newImages} $image VIDEI ${newVideos} ${video}");
Navigator.pop(context);
albumResult({
"image": _selectList,
"image_real": newImages,
"video": _selectVideoList,
"video_real": newVideos,
"iosPushedPage": iosPushedPage
});
});
});
}
} else {
if (Platform.isAndroid) {
Navigator.pop(context, _selectList);
} else {
iosAlbum(_selectList, context, (value) {
print(value);
List<String> resultList = new List();
resultList.add(Map<String, String>.from(value[0])["realImagePath"]);
Navigator.pop(context, resultList);
});
}
}
} }
} }
void iosAlbum(List<String> list, BuildContext context, Function fun) {
GengmeiFlutterPlugin.ios_album_path(list).then((value) {
if (value != null) {
fun(List<Map>.from(value));
}
}).catchError((error) {
print(error);
});
}
void iosAlbumGetImagePath(String path, int index) {}
void nativeCamera(BuildContext context) { void nativeCamera(BuildContext context) {
if (_selectList.length == maxCount) { if (_selectList.length == maxCount) {
Toast.show(context, "最多选择${_maxCount}张图片"); Toast.show(context, "最多选择${_maxCount}张图片");
return; return;
} }
AlbumRepository.getInstance().nativeCamera(provider).listen((data) { AlbumRepository.getInstance().nativeCamera(provider).listen((data) {
print("DATTTTTT ${data}"); if (data == null) {
if (data == null || data.isEmpty || data == "") {
Toast.show(context, "没有拍摄照片"); Toast.show(context, "没有拍摄照片");
} else { } else {
Navigator.pop(context, data); ScanImageItem item = new ScanImageItem();
item.realPath = data["realPath"] as String;
item.path = data["path"] as String;
item.isVideo = false;
String foldName = data["folderName"] as String;
var list = _mainValue[foldName];
if (list == null) {
_mainValue[foldName] = new List();
_mainValue[foldName].add(item);
} else {
list.insert(0, item);
}
_mainValue[MainDir].insert(0, item);
_selectList.add(item.realPath);
bool haveIt = false;
_dirList.forEach((it) {
if (it.dirName == foldName) {
haveIt = true;
it.picCount++;
}
});
if (!haveIt) {
_dirList.add(new DirBean(foldName, 1, File(item.path)));
}
dirLive.notifyView(_dirList);
albumLive.notifyView(_mainValue[_nowDirName]);
selectSizeLive.notifyView(_selectList.length + _selectVideoList.length);
// Navigator.pop(context, data);
// _selectList.add(data); // _selectList.add(data);
//TODO //TODO
} }
...@@ -248,4 +405,41 @@ class AlbumModel extends BaseModel { ...@@ -248,4 +405,41 @@ class AlbumModel extends BaseModel {
print(colorString); print(colorString);
backLive.notifyView(int.parse(colorString)); backLive.notifyView(int.parse(colorString));
} }
String getFormatTime(String during) {
if (during == null) {
return "";
} else {
if (Platform.isIOS) {
return during;
}
try {
var parse = int.parse(during);
String min;
int minn;
if (parse > 60 * 1000) {
min = "00";
minn = 0;
} else {
minn = (parse / (60 * 1000)).floor();
min = "${minn}";
}
String second = "${((parse - minn * (60 * 1000)) / 1000).floor()}";
if (min.length == 1) {
min = "0$min";
}
if (second.length == 1) {
second = "0$second";
}
if (min.length > 2) {
min = "99";
}
return "$min:$second";
} catch (e) {
print(e);
return "";
}
}
}
} }
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:gengmei_flutter_plugin/ScanImagePlugn.dart'; import 'package:gengmei_flutter_plugin/ScanImagePlugn.dart';
import 'package:gmalpha_flutter/AlbumModel/bean/DirBean.dart'; import 'package:gmalpha_flutter/AlbumModel/bean/DirBean.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart'; import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart';
import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart'; import 'package:gmalpha_flutter/res/value/ALColors.dart';
import 'AlbumModel.dart'; import 'AlbumModel.dart';
...@@ -15,18 +17,27 @@ import 'AlbumModel.dart'; ...@@ -15,18 +17,27 @@ import 'AlbumModel.dart';
class AlbumPage extends StatefulWidget { class AlbumPage extends StatefulWidget {
AlbumModel model; AlbumModel model;
AlbumPage(String provider, bool showCamera, int maxCount, AlbumPage(
List<String> selectedList) { String provider,
model = new AlbumModel(provider, showCamera, maxCount, selectedList); bool showCamera,
int maxCount,
List<String> selectedList,
bool fromNative,
int maxVideo,
List<String> videoSelectPath,
String fromPage
,String iosPushedPage) {
model = new AlbumModel(provider, showCamera, maxCount, selectedList,
fromNative, maxVideo, videoSelectPath, fromPage,iosPushedPage);
} }
@override @override
State<StatefulWidget> createState() => AlbumState(model); State<StatefulWidget> createState() => AlbumState(model);
} }
class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { class AlbumState extends BasePage<AlbumPage>
with SingleTickerProviderStateMixin {
final AlbumModel _model; final AlbumModel _model;
String colorString = "0x00000000";
AlbumState(this._model); AlbumState(this._model);
...@@ -50,8 +61,8 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -50,8 +61,8 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: baseAppBarChangeTitle( appBar: baseAppBarChangeTitle(
backClick: (){ backClick: () {
Navigator.pop(context,null); Navigator.pop(context, null);
}, },
centerTitle: true, centerTitle: true,
title: GestureDetector( title: GestureDetector(
...@@ -105,18 +116,21 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -105,18 +116,21 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
initialData: _model.selectSizeLive.data, initialData: _model.selectSizeLive.data,
builder: (c, data) { builder: (c, data) {
String showText = "下一步"; String showText = "下一步";
Color color = ALColors.Color8E8E8E;
if (data.data != null && data.data != 0) { if (data.data != null && data.data != 0) {
showText = "$showText(${data.data})"; showText = "$showText(${data.data})";
color = ALColors.Color323232;
} }
return Center( return Center(
child: GestureDetector( child: GestureDetector(
onTap: () => _model.onNext(context), onTap: () {
if (data.data != null && data.data != 0) {
_model.onNext(context);
}
},
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(0, 0, 16, 0), margin: EdgeInsets.fromLTRB(0, 0, 16, 0),
child: Text( child: baseText(showText, 16, color),
showText,
style: TextStyle(fontSize: 16),
),
))); )));
}, },
) )
...@@ -125,29 +139,33 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -125,29 +139,33 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
body: Stack( body: Stack(
children: <Widget>[ children: <Widget>[
mainView(), mainView(),
StreamBuilder<int>( backView(),
stream: _model.backLive.stream,
initialData: _model.backLive.data,
builder: (con, data) {
if (data.data == null) {
return Container();
}
return GestureDetector(
onTap: () {
_model.changPopState();
},
child: Container(
width: double.maxFinite,
height: double.maxFinite,
color: Color(data.data),
));
},
),
popWindow(), popWindow(),
], ],
)); ));
} }
backView() {
return StreamBuilder<int>(
stream: _model.backLive.stream,
initialData: _model.backLive.data,
builder: (con, data) {
if (data.data == null) {
return Container();
}
return GestureDetector(
onTap: () {
_model.changPopState();
},
child: Container(
width: double.maxFinite,
height: double.maxFinite,
color: Color(data.data),
));
},
);
}
@override @override
void dispose() { void dispose() {
controller.dispose(); controller.dispose();
...@@ -171,9 +189,9 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -171,9 +189,9 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
} }
return GridView.builder( return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 4,
crossAxisSpacing: 5, crossAxisSpacing: 1,
mainAxisSpacing: 5, mainAxisSpacing: 1,
childAspectRatio: 1), childAspectRatio: 1),
itemCount: itemCount:
_model.showCamera ? imgList.data.length + 1 : imgList.data.length, _model.showCamera ? imgList.data.length + 1 : imgList.data.length,
...@@ -181,33 +199,24 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -181,33 +199,24 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
if (index == 0 && _model.showCamera) { if (index == 0 && _model.showCamera) {
return GestureDetector( return GestureDetector(
onTap: () => _model.nativeCamera(context), onTap: () => _model.nativeCamera(context),
child: Container( child: Center(
color: Colors.yellow, child: SvgPicture.asset("images/camera.svg"),
child: Column( ));
children: <Widget>[
Expanded(
child: Container(),
),
Icon(Icons.camera_alt),
Container(
margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
child: Text("本地相机"),
),
Expanded(
child: Container(),
),
],
)));
} }
int newIndex = _model.showCamera ? index - 1 : index; int newIndex = _model.showCamera ? index - 1 : index;
if (imgList.data[newIndex] == null || if (imgList.data[newIndex] == null ||
imgList.data[newIndex].path == null || imgList.data[newIndex].path == null ||
imgList.data[newIndex].realPath == null) { imgList.data[newIndex].realPath == null && Platform.isAndroid) {
return Icon( return Icon(
Icons.photo, Icons.photo,
size: 20, size: 20,
); );
} }
String during;
if (_model.maxVideoCount > 0 && _model.isVideo(newIndex)) {
during = _model.getFormatTime(imgList.data[newIndex].during);
// print("druing ${imgList.data[newIndex].during} dur ${during}");
}
return GestureDetector( return GestureDetector(
onTap: () => _model.clickItem(context, newIndex), onTap: () => _model.clickItem(context, newIndex),
child: Container( child: Container(
...@@ -216,26 +225,38 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -216,26 +225,38 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
image: FileImage(File(imgList.data[newIndex].path)), image: FileImage(File(imgList.data[newIndex].path)),
fit: BoxFit.cover), fit: BoxFit.cover),
borderRadius: BorderRadius.all(Radius.circular(3.0))), borderRadius: BorderRadius.all(Radius.circular(3.0))),
margin: EdgeInsets.only(left: 2, top: 2, right: 2, bottom: 2), margin: EdgeInsets.only(left: 1, top: 1, right: 1, bottom: 1),
child: Stack( child: Stack(
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
children: <Widget>[ children: <Widget>[
_model.isSelect(newIndex) _model.maxVideoCount > 0 && _model.isVideo(newIndex)
? Icon( ? _model.isSelectVideo(newIndex)
Icons.check_circle, ? SvgPicture.asset("images/album_sel.svg")
color: Colors.amberAccent, : SvgPicture.asset("images/album_not_sel.svg")
size: 25, : _model.isSelect(newIndex)
) ? SvgPicture.asset("images/album_sel.svg")
: Icon( : SvgPicture.asset("images/album_not_sel.svg"),
Icons.check_circle_outline, _model.maxVideoCount > 0 && _model.isVideo(newIndex)
color: Colors.grey, ? _model.isFullSelectVideo() &&
size: 25, !_model.isSelectVideo(newIndex)
), ? Container(
_model.isFullSelect() && !_model.isSelect(newIndex) width: double.maxFinite,
? Container( height: double.maxFinite,
width: double.maxFinite, color: ALColors.Color33000000,
height: double.maxFinite, )
color: Colors.white60, : Container()
: _model.isFullSelect() && !_model.isSelect(newIndex)
? Container(
width: double.maxFinite,
height: double.maxFinite,
color: ALColors.Color33000000,
)
: Container(),
_model.maxVideoCount > 0 && _model.isVideo(newIndex)
? Positioned(
left: 50,
top: 70,
child: baseText(during, 15, ALColors.ColorF8F8F8),
) )
: Container() : Container()
], ],
...@@ -268,7 +289,7 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -268,7 +289,7 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
return SlideTransition( return SlideTransition(
position: animation, position: animation,
child: Container( child: Container(
padding: EdgeInsets.fromLTRB(16, 3, 16, 3), padding: EdgeInsets.fromLTRB(12, 6, 21, 6),
color: Colors.white, color: Colors.white,
height: 280, height: 280,
child: ListView.separated( child: ListView.separated(
...@@ -282,25 +303,37 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin { ...@@ -282,25 +303,37 @@ class AlbumState extends State<AlbumPage> with SingleTickerProviderStateMixin {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
width: 50, width: 52,
height: 50, height: 52,
child: Image.file( child: Image.file(
snapshot.data[index].pic, snapshot.data[index].pic,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
Container( Container(
padding: EdgeInsets.fromLTRB(5, 0, 0, 0), padding: EdgeInsets.fromLTRB(10, 0, 0, 0),
child: Text( child: baseText(
"${snapshot.data[index].dirName} (${snapshot.data[index].picCount})"), "${snapshot.data[index].dirName} (${snapshot.data[index].picCount})",
11,
ALColors.Color323232),
), ),
Expanded( Expanded(
child: Text(""), child: Text(""),
), ),
Icon(Icons.chevron_right) // Icon(Icons.chevron_right)
], ],
), ),
); );
}))); })));
} }
@override
String pageName() {
return "album";
}
@override
String referrer() {
return _model.fromPage;
}
} }
...@@ -24,21 +24,28 @@ class AlbumRepository { ...@@ -24,21 +24,28 @@ class AlbumRepository {
Observable<Map<String, List<ScanImageItem>>> scanPhoneImg() { Observable<Map<String, List<ScanImageItem>>> scanPhoneImg() {
return Observable.fromFuture(GengmeiFlutterPlugin.phoneImages()) return Observable.fromFuture(GengmeiFlutterPlugin.phoneImages())
.map((value) { .map((value) {
if (value != null) { // Map<String, List<ScanImageItem>> finalList = new Map();
_cacheList.clear(); // var all = value["IsGengmeiAlbumAllImages"];
_cacheList.addAll(value); // if (all != null) {
} // value.forEach((k, v) {
// List<ScanImageItem> newList = List();
// v.forEach((value) {
//
// });
// });
// }
//
// if (value != null) {}
return value; return value;
}); });
} }
get cacheList => _cacheList;
void clearMemory() { void clearMemory() {
_cacheList.clear(); _cacheList.clear();
} }
Observable<String> nativeCamera(String provider) { Observable<Map> nativeCamera(String provider) {
return Observable.fromFuture(GengmeiFlutterPlugin.nativeCamera(provider)); return Observable.fromFuture(GengmeiFlutterPlugin.nativeCamera(provider));
} }
......
...@@ -24,18 +24,17 @@ Widget messageTop(imgUrl, title, content, count) { ...@@ -24,18 +24,17 @@ Widget messageTop(imgUrl, title, content, count) {
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.only(top: height, bottom: height), padding: EdgeInsets.only(top: height, bottom: height),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(4)),
left: ScreenUtil.instance.setWidth(4)),
width: double.infinity, width: double.infinity,
height: ScreenUtil.instance.setHeight(50), height: ScreenUtil.instance.setHeight(50),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Hero( Hero(
tag: "icon", tag: "icon",
child: SvgPicture.asset( child: SvgPicture.asset(
imgUrl, imgUrl,
color: ALColors.Color323232, color: ALColors.Color323232,
)), )),
SizedBox( SizedBox(
width: ScreenUtil.instance.setWidth(8), width: ScreenUtil.instance.setWidth(8),
), ),
...@@ -164,7 +163,9 @@ Widget messageList(Data list) { ...@@ -164,7 +163,9 @@ Widget messageList(Data list) {
"page_name": "message_home", "page_name": "message_home",
"topic_id": "${list.repliedContent.topicId}", "topic_id": "${list.repliedContent.topicId}",
"user_name": list.name, "user_name": list.name,
"pictorial_id": list.repliedContent.pictorialId "pictorial_id": list.repliedContent.pictorialId == null
? null
: list.repliedContent.pictorialId
}); });
}, },
child: Container( child: Container(
......
...@@ -13,7 +13,7 @@ class TestPage extends StatelessWidget { ...@@ -13,7 +13,7 @@ class TestPage extends StatelessWidget {
TestPage() { TestPage() {
Api.getInstance().setDioCookie({ Api.getInstance().setDioCookie({
'Cookie': 'Cookie':
'sessionid=oji01pi0mou9l5ktg425mibrimyq5vc3;_gtid=120408d4f3c911e99a80525400e82fab6178;_gm_token=06e9361571644418' '_gm_token=709ed71571898502; sessionid=usixwh8e2bfykdsiq5ydt0ss6kfc0c26; _gtid=52ebb2a2f62611e9b181525400e82fab3838'
}); });
} }
...@@ -50,10 +50,9 @@ class TestPage extends StatelessWidget { ...@@ -50,10 +50,9 @@ class TestPage extends StatelessWidget {
testMessagePage(BuildContext context) { testMessagePage(BuildContext context) {
return base(context, () { return base(context, () {
Navigator.push( Navigator.push(
context, context,
new CustomRoute(RouterCenterImpl() new CustomRoute(
.findNewMessageRouter()?.getMessagePage('')) RouterCenterImpl().findNewMessageRouter()?.getMessagePage('')));
);
}, "消息页面"); }, "消息页面");
} }
...@@ -82,7 +81,12 @@ class TestPage extends StatelessWidget { ...@@ -82,7 +81,12 @@ class TestPage extends StatelessWidget {
Navigator.push( Navigator.push(
context, context,
new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage( new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
"com.example.gengmei_flutter_plugin_example", true, 9, null))); "com.example.gmalpha_flutter",
true,
9,
null,
false,
"test",maxVideoCount: 1)));
}, "相册页面"); }, "相册页面");
} }
...@@ -99,30 +103,30 @@ class TestPage extends StatelessWidget { ...@@ -99,30 +103,30 @@ class TestPage extends StatelessWidget {
attentionPage(BuildContext context) { attentionPage(BuildContext context) {
return base(context, () { return base(context, () {
Navigator.push( Navigator.push(
context, context,
new CustomRoute(RouterCenterImpl() new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getAttentionPage('message_home')) .findNewMessageRouter()
); ?.getAttentionPage('message_home')));
}, "通知页面"); }, "通知页面");
} }
likePage(BuildContext context) { likePage(BuildContext context) {
return base(context, () { return base(context, () {
Navigator.push( Navigator.push(
context, context,
new CustomRoute(RouterCenterImpl() new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getLikePage('message_home')) .findNewMessageRouter()
); ?.getLikePage('message_home')));
}, "like页面"); }, "like页面");
} }
focusPage(BuildContext context) { focusPage(BuildContext context) {
return base(context, () { return base(context, () {
Navigator.push( Navigator.push(
context, context,
new CustomRoute(RouterCenterImpl() new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getFocusPage('message_home')) .findNewMessageRouter()
); ?.getFocusPage('message_home')));
}, "关注页面"); }, "关注页面");
} }
} }
...@@ -21,7 +21,9 @@ const NET_TYPE = "GET_NET_TYPE"; ...@@ -21,7 +21,9 @@ const NET_TYPE = "GET_NET_TYPE";
const INIT_PARAMS = "INIT_PARAMS"; const INIT_PARAMS = "INIT_PARAMS";
const UPLOAD_IMG = "UPLOAD_IMG"; const UPLOAD_IMG = "UPLOAD_IMG";
const USER_LOGOUT = "USER_LOGOUT"; const USER_LOGOUT = "USER_LOGOUT";
const platform = const MethodChannel('flutter_channel'); const FINISH_CURRENT_ACTIVITY = "FINISH_CURRENT_ACTIVITY";
const ALBUM_RESULT = "ALBUM_RESULT";
const methodChannel = const MethodChannel('flutter_channel');
const eventChannel = const EventChannel('flutter_channel_event'); const eventChannel = const EventChannel('flutter_channel_event');
StreamSubscription _listen; StreamSubscription _listen;
...@@ -30,7 +32,7 @@ void jumpToH5(String jumpToName, Map params) { ...@@ -30,7 +32,7 @@ void jumpToH5(String jumpToName, Map params) {
if (params != null) { if (params != null) {
map.addAll(params); map.addAll(params);
} }
platform.invokeMethod("FLUTTER_TO_H5", map); methodChannel.invokeMethod("FLUTTER_TO_H5", map);
} }
void jumpToNative(String jumpToName, Map params) { void jumpToNative(String jumpToName, Map params) {
...@@ -38,7 +40,7 @@ void jumpToNative(String jumpToName, Map params) { ...@@ -38,7 +40,7 @@ void jumpToNative(String jumpToName, Map params) {
if (params != null) { if (params != null) {
map.addAll(params); map.addAll(params);
} }
platform.invokeMethod("FLUTTER_TO_NATIVE", map); methodChannel.invokeMethod("FLUTTER_TO_NATIVE", map);
} }
void jumpToFlutter(String jumpToName, Map params) { void jumpToFlutter(String jumpToName, Map params) {
...@@ -46,35 +48,45 @@ void jumpToFlutter(String jumpToName, Map params) { ...@@ -46,35 +48,45 @@ void jumpToFlutter(String jumpToName, Map params) {
if (params != null) { if (params != null) {
map.addAll(params); map.addAll(params);
} }
platform.invokeMethod("FLUTTER_TO_FLUTTER", map); methodChannel.invokeMethod("FLUTTER_TO_FLUTTER", map);
} }
Future getBuriedInfo() async { Future getBuriedInfo() async {
return await platform.invokeMethod(BURIED_METHOD, null); return await methodChannel.invokeMethod(BURIED_METHOD, null);
} }
Observable messagePopPicker(Map params) { Observable messagePopPicker(Map params) {
return Observable.fromFuture( return Observable.fromFuture(
platform.invokeMethod("MESSAGE_POP_PICKER", params)); methodChannel.invokeMethod("MESSAGE_POP_PICKER", params));
} }
Observable getNetType() { Observable getNetType() {
return Observable.fromFuture(platform.invokeMethod(NET_TYPE, null)); return Observable.fromFuture(methodChannel.invokeMethod(NET_TYPE, null));
} }
Observable<String> uploadImg(String path, String token) { Observable<String> uploadImg(String path, String token) {
return Observable.fromFuture( return Observable.fromFuture(
platform.invokeMethod(UPLOAD_IMG, {"path": path, "token": token})); methodChannel.invokeMethod(UPLOAD_IMG, {"path": path, "token": token}));
} }
Observable<bool> userLogout() { Observable<bool> userLogout() {
return Observable.fromFuture(platform.invokeMethod(USER_LOGOUT)); return Observable.fromFuture(methodChannel.invokeMethod(USER_LOGOUT));
}
Observable<bool> finishCurrentActivity() {
return Observable.fromFuture(
methodChannel.invokeMethod(FINISH_CURRENT_ACTIVITY));
}
Observable<bool> albumResult(Map selectList) {
return Observable.fromFuture(
methodChannel.invokeMethod(ALBUM_RESULT, selectList));
} }
void initParams(VoidCallback callback) { void initParams(VoidCallback callback) {
_listen = _listen =
eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError); eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
platform.invokeMethod(INIT_PARAMS, null).then((value) { methodChannel.invokeMethod(INIT_PARAMS, null).then((value) {
print("lsy INITPARAMS !! $value"); print("lsy INITPARAMS !! $value");
Api.getInstance().initBuildConfig(value); Api.getInstance().initBuildConfig(value);
initBuried(callback); initBuried(callback);
......
...@@ -28,12 +28,14 @@ AppBar baseAppBarChangeTitle( ...@@ -28,12 +28,14 @@ AppBar baseAppBarChangeTitle(
bool centerTitle, bool centerTitle,
VoidCallback backClick}) { VoidCallback backClick}) {
return AppBar( return AppBar(
backgroundColor: ALColors.ColorFFFFFF,
title: title, title: title,
centerTitle: centerTitle, centerTitle: centerTitle,
elevation: 0.0, elevation: 0.0,
leading: GestureDetector( leading: GestureDetector(
onTap: backClick, onTap: backClick,
child: Container( child: Container(
color: ALColors.ColorFFFFFF,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 22), padding: EdgeInsets.only(left: 22),
width: 30, width: 30,
......
...@@ -15,12 +15,14 @@ class BaseCenterPicker extends StatefulWidget { ...@@ -15,12 +15,14 @@ class BaseCenterPicker extends StatefulWidget {
setPicker(ICenterPicker picker) { setPicker(ICenterPicker picker) {
this.picker = picker; this.picker = picker;
}
sync() {
centerState?.setState(() {}); centerState?.setState(() {});
} }
setCancelOutside(bool cancel) { setCancelOutside(bool cancel) {
this.cancelOutSide = cancel; this.cancelOutSide = cancel;
centerState?.setState(() {});
} }
show(BuildContext context) { show(BuildContext context) {
...@@ -41,9 +43,8 @@ class BaseCenterPicker extends StatefulWidget { ...@@ -41,9 +43,8 @@ class BaseCenterPicker extends StatefulWidget {
class BaseCenterPickerState extends State<BaseCenterPicker> { class BaseCenterPickerState extends State<BaseCenterPicker> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context); // ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
return CupertinoFullscreenDialogTransition( return Container(
child: Container(
color: Colors.black54, color: Colors.black54,
width: double.maxFinite, width: double.maxFinite,
height: double.maxFinite, height: double.maxFinite,
...@@ -63,7 +64,7 @@ class BaseCenterPickerState extends State<BaseCenterPicker> { ...@@ -63,7 +64,7 @@ class BaseCenterPickerState extends State<BaseCenterPicker> {
)) ))
], ],
), ),
)); );
} }
} }
......
...@@ -7,10 +7,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; ...@@ -7,10 +7,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart'; import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart';
import 'package:gmalpha_flutter/Error_Page.dart'; import 'package:gmalpha_flutter/Error_Page.dart';
import 'package:gmalpha_flutter/TestPage.dart'; import 'package:gmalpha_flutter/TestPage.dart';
import 'package:gmalpha_flutter/commonModel/cache/CacheManager.dart';
import 'package:gmalpha_flutter/commonModel/net/Api.dart';
import 'package:gmalpha_flutter/commonModel/util/IsolateUtil.dart';
import 'package:gmalpha_flutter/messageModel/home/message_home.dart';
import 'commonModel/GMBase.dart'; import 'commonModel/GMBase.dart';
...@@ -59,16 +55,26 @@ class _MyAppState extends State<MyApp> { ...@@ -59,16 +55,26 @@ class _MyAppState extends State<MyApp> {
if (params == null) { if (params == null) {
return ErrorPage("出错:需要传递的参数为空"); return ErrorPage("出错:需要传递的参数为空");
} }
var provider = params["provider"] as String;
return RouterCenterImpl().findAlbumRouter().getAlbumPage( return RouterCenterImpl().findAlbumRouter().getAlbumPage(
provider, params["provider"] as String,
params["needCamera"] == null params["needCamera"] == null
? true ? true
: params["needCamera"] == "0" ? true : false, : params["needCamera"] == "0" ? true : false,
params["maxCount"] == null ? 1 : int.parse(params["maxCount"]), params["maxCount"] == null ? 1 : int.parse(params["maxCount"]),
params["selectedPath"] == null params["selectedPath"] == null
? null ? null
: params["selectedPath"] as List<String>); : new List<String>.from(params["selectedPath"]),
true,
params["fromPage"] == null ? "" : params["fromPage"],
maxVideoCount: params["maxVideoCount"] == null
? 0
: int.parse(params["maxVideoCount"]),
videoSelectPath: params["videoSelectedPath"] == null
? null
: new List<String>.from(params["videoSelectedPath"]),
iosPushedPage: params["iosPushedPage"] == null
? null
: params["iosPushedPage"]);
}, },
"prestige": (pageName, params, _) { "prestige": (pageName, params, _) {
print("PARAMS!! ${params}"); print("PARAMS!! ${params}");
...@@ -87,13 +93,13 @@ class _MyAppState extends State<MyApp> { ...@@ -87,13 +93,13 @@ class _MyAppState extends State<MyApp> {
return RouterCenterImpl() return RouterCenterImpl()
.findActivityReportRouter() .findActivityReportRouter()
?.getActivityReportPage( ?.getActivityReportPage(
params["survey_record_id"] == null params["survey_record_id"] == null
? null ? null
: int.parse(params["survey_record_id"]), : int.parse(params["survey_record_id"]),
params["template_id"] == null params["template_id"] == null
? null ? null
: int.parse(params["template_id"]), : int.parse(params["template_id"]),
params["fromPage"]); params["fromPage"]);
}, },
"message_focus": (pageName, params, _) { "message_focus": (pageName, params, _) {
return RouterCenterImpl() return RouterCenterImpl()
......
...@@ -26,6 +26,7 @@ class ALColors { ...@@ -26,6 +26,7 @@ class ALColors {
static const Color Color5276F4 = Color(0xFF5276F4); static const Color Color5276F4 = Color(0xFF5276F4);
static const Color Color0093FF = Color(0xFF0093FF); static const Color Color0093FF = Color(0xFF0093FF);
static const Color Color666666 = Color(0xFF666666); static const Color Color666666 = Color(0xFF666666);
static const Color Color33000000 = Color(0x33000000);
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
**/ **/
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
...@@ -113,7 +114,13 @@ class UserSettingModel extends BaseModel { ...@@ -113,7 +114,13 @@ class UserSettingModel extends BaseModel {
jumpToCamera(context, pageName, Api.PROVIDER_NAME, true, 1, null) jumpToCamera(context, pageName, Api.PROVIDER_NAME, true, 1, null)
.then((value) { .then((value) {
if (value != null) { if (value != null) {
print("$value");
selectImgPath = value[0]; selectImgPath = value[0];
File txt=File(selectImgPath);
var dir_bool=txt.exists().then((value){
print("RESULT!!!!!$selectImgPath bool ${value}" );
});
headImgLive.notifyView(selectImgPath); headImgLive.notifyView(selectImgPath);
detectUpdate(); detectUpdate();
} }
......
...@@ -10,6 +10,7 @@ import 'package:cached_network_image/cached_network_image.dart'; ...@@ -10,6 +10,7 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/messagePage/common.dart';
import 'package:gmalpha_flutter/commonModel/GMBase.dart'; import 'package:gmalpha_flutter/commonModel/GMBase.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseBuried.dart'; import 'package:gmalpha_flutter/commonModel/base/BaseBuried.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart'; import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart';
...@@ -53,6 +54,7 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -53,6 +54,7 @@ class UserState extends BasePage<UserSettingPage> {
baseLoadingItem = BaseLoadingItem("加载中"); baseLoadingItem = BaseLoadingItem("加载中");
userLogoutPicker = UserLogoutPicker(() { userLogoutPicker = UserLogoutPicker(() {
logoutPicker.setPicker(baseLoadingItem); logoutPicker.setPicker(baseLoadingItem);
logoutPicker.sync();
_model.quit(context, pageName(), () { _model.quit(context, pageName(), () {
logoutPicker.dismiss(context); logoutPicker.dismiss(context);
}); });
...@@ -94,8 +96,10 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -94,8 +96,10 @@ class UserState extends BasePage<UserSettingPage> {
} else { } else {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
BaseCenterPicker()..setPicker(BaseLoadingItem("加载中")) var picker = BaseCenterPicker()
..setCancelOutside(true)..show(context); ..setPicker(BaseLoadingItem("加载中"))
..setCancelOutside(true);
picker.show(context);
_model.save(context); _model.save(context);
}, },
child: Padding( child: Padding(
...@@ -115,7 +119,7 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -115,7 +119,7 @@ class UserState extends BasePage<UserSettingPage> {
Container( Container(
margin: EdgeInsets.fromLTRB(ScreenUtil.instance.setWidth(29), margin: EdgeInsets.fromLTRB(ScreenUtil.instance.setWidth(29),
ScreenUtil.instance.setWidth(25), 0, 0), ScreenUtil.instance.setWidth(25), 0, 0),
child: baseText("设置", 30, ALColors.Color323232), child: baseText('设置', 30, ALColors.Color323232),
), ),
Container( Container(
width: ScreenUtil.instance.setWidth(127), width: ScreenUtil.instance.setWidth(127),
...@@ -127,6 +131,7 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -127,6 +131,7 @@ class UserState extends BasePage<UserSettingPage> {
ScreenUtil.instance.setWidth(23)), ScreenUtil.instance.setWidth(23)),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
clickEvent("page_setting_up","photograph");
_model.jumpToCAM(context, pageName()); _model.jumpToCAM(context, pageName());
}, },
child: Stack( child: Stack(
...@@ -230,8 +235,8 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -230,8 +235,8 @@ class UserState extends BasePage<UserSettingPage> {
jumpToComment(context, pageName()); jumpToComment(context, pageName());
}, "意见与建议", null, true), }, "意见与建议", null, true),
baseDivide(1, 30, ALColors.ColorE4E4E4), baseDivide(1, 30, ALColors.ColorE4E4E4),
baseItem(() {}, "隐私声明", null, true), // baseItem(() {}, "隐私声明", null, true),
baseDivide(1, 30, ALColors.ColorE4E4E4), // baseDivide(1, 30, ALColors.ColorE4E4E4),
], ],
), ),
Expanded( Expanded(
...@@ -246,9 +251,10 @@ class UserState extends BasePage<UserSettingPage> { ...@@ -246,9 +251,10 @@ class UserState extends BasePage<UserSettingPage> {
right: ScreenUtil.instance.setWidth(30)), right: ScreenUtil.instance.setWidth(30)),
child: OutlineButton( child: OutlineButton(
onPressed: () { onPressed: () {
clickEvent("page_setting_up", "quit");
logoutPicker.show(context); logoutPicker.show(context);
}, },
child: baseText("退出登", 14, ALColors.Color323232), child: baseText("退出登", 14, ALColors.Color323232),
borderSide: new BorderSide(color: Color(0xff323232)), borderSide: new BorderSide(color: Color(0xff323232)),
), ),
) )
......
...@@ -19,7 +19,7 @@ Future jumpToCamera(BuildContext context, String refer, String provider, ...@@ -19,7 +19,7 @@ Future jumpToCamera(BuildContext context, String refer, String provider,
return Navigator.push( return Navigator.push(
context, context,
CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage( CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
provider, showCamera, bigSelectImage, selectedImages))); provider, showCamera, bigSelectImage, selectedImages, false, refer)));
} }
Future jumpToCountry(BuildContext context, String refer) { Future jumpToCountry(BuildContext context, String refer) {
......
...@@ -39,7 +39,7 @@ dependencies: ...@@ -39,7 +39,7 @@ dependencies:
gengmei_flutter_plugin: gengmei_flutter_plugin:
git: git:
url: 'git@git.wanmeizhensuo.com:linshengyu/flutter_plugin.git' url: 'git@git.wanmeizhensuo.com:linshengyu/flutter_plugin.git'
ref: "703b4906beabe5fa9ba4e5e76a5b43799a25f89b" ref: "00b2ed0f616c59ba5352a1dd9a3ed1fe8b2d7cdb"
protobuf: ^0.14.4 protobuf: ^0.14.4
grpc: ^2.1.2 grpc: ^2.1.2
flutter_svg: ^0.14.1 flutter_svg: ^0.14.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment