Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
desktop_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
desktop_flutter
Commits
14bfc57b
Commit
14bfc57b
authored
Dec 06, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
53f3c5e8
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
2135 additions
and
401 deletions
+2135
-401
.DS_Store
.DS_Store
+0
-0
.flutter-plugins-dependencies
.flutter-plugins-dependencies
+2
-0
HomeModel.dart
lib/HomeModel.dart
+60
-0
HomeRouter.dart
lib/HomeModel/HomeRouter.dart
+1
-0
HomeRouterImpl.dart
lib/HomeModel/HomeRouterImpl.dart
+7
-0
BaseTitle.dart
lib/HomeModel/base/BaseTitle.dart
+399
-0
WorkView.dart
lib/HomeModel/base/view/WorkView.dart
+3
-1
CreateProject.dart
lib/HomeModel/page/createProject/CreateProject.dart
+261
-0
CreateProjectModel.dart
lib/HomeModel/page/createProject/CreateProjectModel.dart
+53
-0
DataCenter.dart
lib/HomeModel/page/data/DataCenter.dart
+164
-0
DataCenterModel.dart
lib/HomeModel/page/data/DataCenterModel.dart
+26
-0
HomeModel.dart
lib/HomeModel/page/home/HomeModel.dart
+29
-13
HomePage.dart
lib/HomeModel/page/home/HomePage.dart
+183
-28
UploadBean.dart
lib/HomeModel/page/home/UploadBean.dart
+12
-0
UploadHideView.dart
lib/HomeModel/page/home/UploadHideView.dart
+159
-0
PicModel.dart
lib/HomeModel/page/picture/PicModel.dart
+5
-0
PicPage.dart
lib/HomeModel/page/picture/PicPage.dart
+18
-4
WorkModel.dart
lib/HomeModel/page/work/WorkModel.dart
+52
-87
WorkPage.dart
lib/HomeModel/page/work/WorkPage.dart
+135
-119
HomeRepo.dart
lib/HomeModel/service/HomeRepo.dart
+73
-1
AllProjectBean.dart
lib/HomeModel/service/remote/entity/AllProjectBean.dart
+9
-0
DataBean.dart
lib/HomeModel/service/remote/entity/DataBean.dart
+8
-0
UploadMyImageBean.dart
lib/HomeModel/service/remote/entity/UploadMyImageBean.dart
+23
-0
JumpUtil.dart
lib/HomeModel/util/JumpUtil.dart
+18
-0
HomePage.dart
lib/HomePage.dart
+145
-0
UserRouter.dart
lib/UserModel/UserRouter.dart
+2
-0
UserRouterImpl.dart
lib/UserModel/UserRouterImpl.dart
+6
-0
LoginModel.dart
lib/UserModel/page/login/LoginModel.dart
+9
-3
LoginPage.dart
lib/UserModel/page/login/LoginPage.dart
+1
-1
Persionset.dart
lib/UserModel/page/usermanager/Persionset.dart
+27
-0
GMBase.dart
lib/commonModel/GMBase.dart
+0
-1
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+17
-0
BaseState.dart
lib/commonModel/base/BaseState.dart
+37
-0
BaseUtil.dart
lib/commonModel/base/BaseUtil.dart
+0
-16
SaveKey.dart
lib/commonModel/base/SaveKey.dart
+6
-0
ChangeTabBean.dart
lib/commonModel/eventbus/event/ChangeTabBean.dart
+12
-0
LogoutEvent.dart
lib/commonModel/eventbus/event/LogoutEvent.dart
+7
-0
BaseCenterPicker.dart
lib/commonModel/picker/base/BaseCenterPicker.dart
+1
-1
BaseDrawPicker.dart
lib/commonModel/picker/base/BaseDrawPicker.dart
+137
-0
main.dart
lib/main.dart
+7
-1
project.pbxproj
macos/Runner.xcodeproj/project.pbxproj
+6
-107
Runner.xcscheme
...s/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+12
-16
AppInfo.xcconfig
macos/Runner/Configs/AppInfo.xcconfig
+1
-1
pubspec.yaml
pubspec.yaml
+2
-1
No files found.
.DS_Store
View file @
14bfc57b
No preview for this file type
.flutter-plugins-dependencies
0 → 100644
View file @
14bfc57b
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"file_chooser","dependencies":[]},{"name":"flutter_animation_set","dependencies":[]},{"name":"path_provider_fde","dependencies":[]}]}
\ No newline at end of file
lib/HomeModel.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-11-05
**/
import
'dart:math'
;
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'Annotations/RouterCenterRestore.mark.dart'
;
import
'commonModel/live/BaseModel.dart'
;
import
'commonModel/live/LiveData.dart'
;
class
HomeItem
{
HomeItem
(
this
.
index
,
this
.
svgIcon
,
this
.
name
);
int
index
;
String
svgIcon
;
String
name
;
}
class
HomeModel
extends
BaseModel
{
LiveData
<
int
>
widgetLive
=
new
LiveData
();
final
List
<
HomeItem
>
items
=
[];
final
List
<
Widget
>
pages
=
[];
int
currentIndex
=
0
;
@override
void
dispose
()
{
widgetLive
.
dispost
();
}
void
init
()
{
var
mainWidget
=
RouterCenterImpl
().
findHomeRouter
()?.
getHomePage
();
var
persionPage
=
RouterCenterImpl
().
findUserRouter
()?.
getLoginPage
();
var
findPage
=
RouterCenterImpl
().
findHomeRouter
()?.
getDataPage
();
int
index
=
0
;
if
(
mainWidget
!=
null
)
{
items
.
add
(
HomeItem
(
index
,
"images/home.svg"
,
"主页"
));
pages
.
add
(
mainWidget
);
index
++;
}
if
(
persionPage
!=
null
){
items
.
add
(
HomeItem
(
index
,
"images/home.svg"
,
"主页"
));
pages
.
add
(
persionPage
);
index
++;
}
if
(
findPage
!=
null
)
{
items
.
add
(
HomeItem
(
index
,
"images/find.svg"
,
"变美助手"
));
pages
.
add
(
findPage
);
index
++;
}
}
void
onTap
(
int
index
)
{
widgetLive
.
notifyView
(
index
);
}
}
lib/HomeModel/HomeRouter.dart
View file @
14bfc57b
...
@@ -10,4 +10,5 @@ import 'package:flutter/cupertino.dart';
...
@@ -10,4 +10,5 @@ import 'package:flutter/cupertino.dart';
@Router
(
"HomeRouter"
,
HomeRouterImpl
,
true
)
@Router
(
"HomeRouter"
,
HomeRouterImpl
,
true
)
abstract
class
HomeRouter
extends
RouterBaser
{
abstract
class
HomeRouter
extends
RouterBaser
{
Widget
getHomePage
();
Widget
getHomePage
();
Widget
getDataPage
();
}
}
lib/HomeModel/HomeRouterImpl.dart
View file @
14bfc57b
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
* @date 2019-11-07
* @date 2019-11-07
**/
**/
import
'package:example_flutter/HomeModel/HomeRouter.dart'
;
import
'package:example_flutter/HomeModel/HomeRouter.dart'
;
import
'package:example_flutter/HomeModel/page/data/DataCenter.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomePage.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomePage.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
...
@@ -12,4 +13,9 @@ class HomeRouterImpl extends HomeRouter{
...
@@ -12,4 +13,9 @@ class HomeRouterImpl extends HomeRouter{
return
HomePage
();
return
HomePage
();
}
}
@override
Widget
getDataPage
()
{
return
DataCenter
();
}
}
}
\ No newline at end of file
lib/HomeModel/base/BaseTitle.dart
View file @
14bfc57b
...
@@ -3,13 +3,26 @@
...
@@ -3,13 +3,26 @@
* @date 2019-11-13
* @date 2019-11-13
**/
**/
import
'package:event_bus/event_bus.dart'
;
import
'package:example_flutter/HomeModel/HomeRouterImpl.dart'
;
import
'package:example_flutter/HomeModel/page/data/DataCenter.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomePage.dart'
;
import
'package:example_flutter/HomeModel/util/JumpUtil.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/eventbus/event/ChangeTabBean.dart'
;
import
'package:example_flutter/commonModel/eventbus/event/LogoutEvent.dart'
;
import
'package:example_flutter/commonModel/picker/base/BaseDrawPicker.dart'
;
import
'package:example_flutter/main.dart'
;
import
'package:example_flutter/res/anim/Anim.dart'
;
import
'package:example_flutter/res/value/ALColors.dart'
;
import
'package:example_flutter/res/value/ALColors.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_animation_set/widget/behavior_animations.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:pull_to_refresh/pull_to_refresh.dart'
;
getBaseTitle
(
BuildContext
context
)
{
getBaseTitle
(
BuildContext
context
)
{
String
userName
=
String
userName
=
...
@@ -40,3 +53,389 @@ getBaseTitle(BuildContext context) {
...
@@ -40,3 +53,389 @@ getBaseTitle(BuildContext context) {
),
),
]);
]);
}
}
baseShowPopMenu
(
BuildContext
context
,
RelativeRect
rect
,
List
<
String
>
contents
,
double
itemWidght
,
Function
(
String
vale
)
ok
)
async
{
List
<
PopupMenuItem
<
String
>>
list
=
new
List
();
for
(
int
i
=
0
;
i
<
contents
.
length
;
i
++)
{
list
.
add
(
PopupMenuItem
(
value:
contents
[
i
],
child:
Container
(
width:
itemWidght
,
alignment:
Alignment
.
center
,
child:
baseText
(
contents
[
i
],
12
,
ALColors
.
Color666666
),
)));
}
final
result
=
await
showMenu
(
context:
context
,
position:
rect
,
items:
list
);
print
(
result
);
if
(
result
!=
null
)
{
ok
(
result
);
}
}
Widget
basehead
(
BuildContext
context
)
{
String
userName
=
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
"userName"
);
return
Container
(
decoration:
BoxDecoration
(
color:
Color
.
fromARGB
(
255
,
236
,
236
,
236
),
boxShadow:
[
BoxShadow
(
color:
Colors
.
black38
,
blurRadius:
5.0
,
),
]),
height:
kToolbarHeight
,
width:
double
.
maxFinite
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
GestureDetector
(
onTap:
()
{
BaseDrawPicker
()
..
setPicker
(
DrawPicker
([
"全部项目"
,
"成员管理"
,
"数据中心"
]))
..
show
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
22
,
right:
10
),
child:
Icon
(
Icons
.
list
),
)),
baseText
(
"欢迎
${userName}
使用更美AI标注平台"
,
15
,
Colors
.
black
),
Expanded
(
child:
Container
(),
),
FlatButton
(
onPressed:
()
{
baseShowPopMenu
(
context
,
RelativeRect
.
fromLTRB
(
MediaQuery
.
of
(
context
).
size
.
width
-
150
,
kToolbarHeight
+
10
,
MediaQuery
.
of
(
context
).
size
.
width
,
0
),
[
"个人中心"
,
"退出登入"
],
50
,
(
value
)
{
if
(
value
==
"个人中心"
)
{
}
else
if
(
value
==
"退出登入"
)
{
BaseCenterPicker
()
..
setPicker
(
SurePicker
(
"确定退出吗?"
,
()
{
Navigator
.
pop
(
context
);
},
()
{
Navigator
.
pop
(
context
);
eventBus
.
fire
(
LogoutEvent
());
}))
..
show
(
context
);
}
});
},
child:
Row
(
children:
<
Widget
>[
baseText
(
userName
,
15
,
Colors
.
black
),
Icon
(
Icons
.
arrow_drop_down
)
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
right:
22
),
child:
Icon
(
Icons
.
supervised_user_circle
),
)
],
),
);
}
int
drawSelectItem
=
0
;
class
DrawPicker
implements
IDrawPicker
{
List
<
String
>
itemList
;
LiveData
<
int
>
liveData
=
new
LiveData
();
static
List
<
Widget
>
ownWidget
=[
HomePage
(),
DataCenter
()];
DrawPicker
(
this
.
itemList
);
Widget
listItem
(
String
wold
)
{
return
Container
(
alignment:
Alignment
.
center
,
width:
260
,
height:
80
,
child:
baseText
(
wold
,
15
,
Colors
.
white
),
);
}
Widget
selectItem
(
String
word
)
{
return
Container
(
width:
260
,
height:
80
,
child:
Row
(
children:
<
Widget
>[
Container
(
width:
5
,
height:
80
,
color:
Colors
.
pink
,
),
Expanded
(
child:
Container
(
alignment:
Alignment
.
center
,
color:
Color
.
fromARGB
(
255
,
58
,
72
,
91
),
child:
baseText
(
word
,
15
,
Colors
.
white
),
),
)
],
));
}
@override
Widget
build
(
BuildContext
context
,
VoidCallback
dissmissCall
)
{
return
Container
(
width:
260
,
height:
double
.
maxFinite
,
color:
Color
.
fromARGB
(
255
,
67
,
81
,
101
),
child:
Column
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
bottom:
20
),
alignment:
Alignment
.
center
,
width:
260
,
height:
80
,
color:
Color
.
fromARGB
(
255
,
58
,
72
,
91
),
child:
baseText
(
"AI标注平台"
,
23
,
Colors
.
white
),
),
Expanded
(
child:
StreamBuilder
<
int
>(
stream:
liveData
.
stream
,
builder:
(
con
,
data
)
{
return
ListView
.
builder
(
itemBuilder:
(
con
,
index
)
{
if
(
drawSelectItem
==
index
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
dissmissCall
();
},
child:
selectItem
(
itemList
[
index
]),
);
}
else
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
drawSelectItem
=
index
;
liveData
.
notifyView
(
drawSelectItem
);
dissmissCall
();
eventBus
.
fire
(
ChangeTabBean
(
drawSelectItem
));
// if (drawSelectItem == 0) {
// eventBus.fire(ChangeTabBean(0));
// } else if (drawSelectItem == 2) {
// eventBus.fire(ChangeTabBean(1));
// }
},
child:
listItem
(
itemList
[
index
]),
);
}
},
itemCount:
itemList
.
length
,
);
},
),
)
],
),
);
}
@override
dispose
()
{
liveData
.
dispost
();
}
}
Widget
baseButton
(
VoidCallback
press
,
EdgeInsetsGeometry
margin
,
String
text
)
{
return
FlatButton
(
onPressed:
press
,
child:
Container
(
margin:
margin
,
alignment:
Alignment
.
center
,
width:
100
,
height:
39
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
2
),
color:
Colors
.
purple
,
gradient:
LinearGradient
(
colors:
[
Color
.
fromARGB
(
255
,
253
,
113
,
34
),
Color
.
fromARGB
(
255
,
253
,
166
,
41
)
],
begin:
Alignment
.
centerRight
,
end:
Alignment
.
centerLeft
),
),
child:
baseText
(
text
,
15
,
Colors
.
white
),
),
);
}
class
SurePicker
implements
ICenterPicker
{
VoidCallback
cancel
;
VoidCallback
sure
;
final
String
showText
;
SurePicker
(
this
.
showText
,
this
.
cancel
,
this
.
sure
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
20
))),
width:
350
,
height:
260
,
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Container
(
alignment:
Alignment
.
center
,
child:
baseText
(
showText
,
15
,
Colors
.
black
),
),
),
Container
(
height:
1
,
width:
double
.
maxFinite
,
color:
Colors
.
black54
,
),
Container
(
width:
double
.
maxFinite
,
height:
50
,
child:
Row
(
children:
<
Widget
>[
Expanded
(
child:
GestureDetector
(
onTap:
cancel
,
child:
Container
(
color:
Colors
.
transparent
,
alignment:
Alignment
.
center
,
child:
baseText
(
"取消"
,
12
,
Colors
.
black38
),
)),
),
Container
(
width:
1
,
height:
double
.
maxFinite
,
color:
Colors
.
black54
,
),
Expanded
(
child:
GestureDetector
(
onTap:
sure
,
child:
Container
(
color:
Colors
.
transparent
,
alignment:
Alignment
.
center
,
child:
baseText
(
"确定"
,
12
,
Colors
.
red
),
),
),
)
],
),
)
],
),
);
}
}
class
MyAppBar
extends
StatelessWidget
implements
PreferredSizeWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
basehead
(
context
);
}
@override
Size
get
preferredSize
=>
Size
.
fromHeight
(
kToolbarHeight
);
}
class
StickyTabBarDelegate
extends
SliverPersistentHeaderDelegate
{
final
TabBar
child
;
StickyTabBarDelegate
({
@required
this
.
child
});
@override
Widget
build
(
BuildContext
context
,
double
shrinkOffset
,
bool
overlapsContent
)
{
return
this
.
child
;
}
@override
double
get
maxExtent
=>
this
.
child
.
preferredSize
.
height
;
@override
double
get
minExtent
=>
this
.
child
.
preferredSize
.
height
;
@override
bool
shouldRebuild
(
SliverPersistentHeaderDelegate
oldDelegate
)
{
return
true
;
}
}
Widget
refreshView
(
RefreshController
refreshController
,
VoidCallback
refresh
,
Widget
topFix
,
Widget
List
)
{
return
SmartRefresher
(
enablePullDown:
true
,
enablePullUp:
false
,
header:
WaterDropMaterialHeader
(
backgroundColor:
Color
.
fromARGB
(
255
,
236
,
236
,
236
),
),
controller:
refreshController
,
onRefresh:
refresh
,
child:
CustomScrollView
(
slivers:
<
Widget
>[
SliverToBoxAdapter
(
child:
topFix
,
),
List
],
));
}
Widget
refreshloadingItem
(
VoidCallback
callback
)
{
Widget
loadCircle
=
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Expanded
(
child:
Container
(),
),
Container
(
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Colors
.
orange
,
),
alignment:
Alignment
.
center
,
width:
100
,
height:
100
,
child:
YYSingleLike
(),
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
bottom:
10
),
child:
RichText
(
text:
TextSpan
(
text:
'等待选取图片,点击上方按钮和'
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
black
),
children:
[
TextSpan
(
text:
' 这里 '
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
blue
),
recognizer:
TapGestureRecognizer
()..
onTap
=
callback
,
),
TextSpan
(
text:
'都可以打开上传框哦'
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
black
),
),
WidgetSpan
(
alignment:
PlaceholderAlignment
.
middle
,
child:
Image
.
asset
(
'assets/noavatar.png'
,
width:
20
,
height:
20
,
),
),
],
),
),
),
Expanded
(
child:
Container
(),
),
],
);
return
SliverFillViewport
(
delegate:
SliverChildListDelegate
([
loadCircle
]));
}
lib/HomeModel/base/view/WorkView.dart
View file @
14bfc57b
...
@@ -67,7 +67,9 @@ class WorkView extends CustomPainter {
...
@@ -67,7 +67,9 @@ class WorkView extends CustomPainter {
if
(
showheight
>
size
.
height
)
{
if
(
showheight
>
size
.
height
)
{
// showheight = size.height;
// showheight = size.height;
// top=(showheight-size.height)/2;
// top=(showheight-size.height)/2;
}
else
{}
}
else
{
}
top
=
(
size
.
height
-
showheight
)
/
2
;
top
=
(
size
.
height
-
showheight
)
/
2
;
call
(
scareSize
,
top
,
(
size
.
height
-
showheight
)
/
2
);
call
(
scareSize
,
top
,
(
size
.
height
-
showheight
)
/
2
);
canvas
.
drawImageRect
(
canvas
.
drawImageRect
(
...
...
lib/HomeModel/page/createProject/CreateProject.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-03
**/
import
'dart:async'
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/page/createProject/CreateProjectModel.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/main.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
class
CreateProject
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
CreateProjectState
();
}
class
CreateProjectState
extends
BaseState
<
CreateProject
>
{
CreateProjectModel
_model
;
TextEditingController
nameController
;
TextEditingController
contentController
;
@override
void
initState
()
{
nameController
=
TextEditingController
();
contentController
=
TextEditingController
();
_model
=
new
CreateProjectModel
();
super
.
initState
();
}
@override
void
dispose
()
{
nameController
.
dispose
();
contentController
.
dispose
();
_model
.
dispose
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
MyAppBar
(),
body:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
22
,
top:
22
),
child:
baseText
(
"新建项目"
,
15
,
Colors
.
black
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
22
,
top:
5
,
bottom:
20
),
child:
baseText
(
"请耐心按顺序认真的填写项目内容"
,
15
,
Colors
.
black
),
),
StreamBuilder
(
stream:
_model
.
currentIndexLive
.
stream
,
initialData:
_model
.
currentIndexLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
}
return
Row
(
children:
<
Widget
>[
Container
(
width:
22
,
),
GestureDetector
(
onTap:
()
{
_model
.
tabChange
(
1
);
},
child:
Column
(
children:
<
Widget
>[
Icon
(
Icons
.
looks_one
,
size:
50
,
color:
Colors
.
yellow
,
),
Container
(
height:
5
,
),
baseText
(
"填写项目名称"
,
15
,
Colors
.
black
)
],
)),
Container
(
margin:
EdgeInsets
.
only
(
left:
20
,
right:
20
,
bottom:
20
),
width:
230
,
height:
1
,
color:
data
.
data
==
2
?
Colors
.
black
:
Colors
.
grey
,
),
GestureDetector
(
onTap:
()
{
_model
.
tabChange
(
2
);
},
child:
Column
(
children:
<
Widget
>[
Icon
(
Icons
.
looks_two
,
size:
50
,
color:
data
.
data
==
2
?
Colors
.
yellow
:
Colors
.
black
,
),
Container
(
height:
5
,
),
baseText
(
"上传或选择已有的数据集"
,
15
,
data
.
data
==
2
?
Colors
.
black
:
Colors
.
grey
)
],
))
],
);
},
),
StreamBuilder
<
ProjectUI
>(
stream:
_model
.
projectLive
.
stream
,
initialData:
_model
.
projectLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
}
if
(
data
.
data
.
index
==
1
)
{
return
page1
();
}
else
if
(
data
.
data
.
index
==
2
)
{
return
page2
();
}
},
)
],
),
);
}
Widget
page2
()
{
return
Expanded
(
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
Container
(
height:
double
.
maxFinite
,
margin:
EdgeInsets
.
all
(
20
),
child:
Card
(
elevation:
10
,
child:
Column
(
children:
<
Widget
>[
],
),
),
),
),
Expanded
(
flex:
3
,
child:
Container
(
height:
double
.
maxFinite
,
margin:
EdgeInsets
.
fromLTRB
(
20
,
20
,
300
,
20
),
child:
Card
(
elevation:
10
,
child:
ListView
(
children:
<
Widget
>[
baseText
(
"wdwad"
,
16
,
Colors
.
black
),
baseText
(
"wdwad"
,
16
,
Colors
.
black
),
],
),
),
),
),
],
),
),
Container
(
height:
20
,
),
Row
(
children:
<
Widget
>[
baseButton
(()
{
//TODO
},
EdgeInsets
.
only
(),
"完成"
),
Container
(
width:
10
,
),
baseButton
(()
{
Navigator
.
pop
(
context
);
},
EdgeInsets
.
only
(),
"返回"
),
],
),
Container
(
height:
20
,
),
],
),
);
}
Widget
page1
()
{
return
Expanded
(
child:
Column
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
22
,
top:
50
,
right:
500
),
child:
TextFormField
(
decoration:
InputDecoration
(
labelText:
'请输入项目名称'
,
hintText:
"项目名称"
,
hintStyle:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
13
,
),
prefixIcon:
Icon
(
Icons
.
nature
),
),
//校验用户
validator:
(
value
)
{
return
value
.
trim
().
length
>
0
?
null
:
"项目名称不能为空"
;
},
controller:
nameController
,
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
22
,
top:
30
,
right:
500
),
child:
TextFormField
(
decoration:
InputDecoration
(
labelText:
'请输入项目描述'
,
hintText:
"项目描述"
,
hintStyle:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
13
,
),
prefixIcon:
Icon
(
Icons
.
content_copy
),
),
//校验用户
validator:
(
value
)
{
return
value
.
trim
().
length
>
0
?
null
:
"项目描述不能为空"
;
},
controller:
contentController
,
),
),
Container
(
height:
80
,
),
Row
(
children:
<
Widget
>[
baseButton
(()
{
_model
.
next
(
context
,
nameController
.
text
,
contentController
.
text
);
},
EdgeInsets
.
only
(),
"下一步"
),
Container
(
width:
10
,
),
baseButton
(()
{
Navigator
.
pop
(
context
);
},
EdgeInsets
.
only
(),
"返回"
),
],
)
],
),
);
}
}
lib/HomeModel/page/createProject/CreateProjectModel.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-03
**/
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/toast/toast.dart'
;
import
'package:flutter/cupertino.dart'
;
class
CreateProjectModel
extends
BaseModel
{
LiveData
<
int
>
currentIndexLive
=
new
LiveData
();
LiveData
<
ProjectUI
>
projectLive
=
new
LiveData
();
CreateProjectModel
()
{
currentIndexLive
.
notifyView
(
1
);
var
projectUI
=
ProjectUI
();
projectUI
.
index
=
1
;
projectLive
.
notifyView
(
projectUI
);
}
tabChange
(
int
tab
)
{
currentIndexLive
.
notifyView
(
tab
);
projectLive
.
data
.
index
=
tab
;
projectLive
.
notifyView
(
projectLive
.
data
);
}
@override
void
dispose
()
{
projectLive
.
dispost
();
currentIndexLive
.
dispost
();
}
void
next
(
BuildContext
context
,
String
text
,
String
text2
)
{
if
(
text
.
isEmpty
||
text2
.
isEmpty
)
{
Toast
.
show
(
context
,
"清输入项目名称和描述哦"
);
return
;
}
projectLive
.
data
.
name
=
text
;
projectLive
.
data
.
content
=
text2
;
//TODO
projectLive
.
data
.
way
=
"图像"
;
projectLive
.
data
.
index
=
2
;
currentIndexLive
.
notifyView
(
2
);
projectLive
.
notifyView
(
projectLive
.
data
);
}
}
class
ProjectUI
{
int
index
;
String
name
;
String
content
;
String
way
;
String
dataList
;
}
lib/HomeModel/page/data/DataCenter.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
import
'dart:async'
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/page/data/DataCenterModel.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/commonModel/eventbus/event/LogoutEvent.dart'
;
import
'package:example_flutter/main.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
class
DataCenter
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
DataCenterState
();
}
class
DataCenterState
extends
BaseState
<
DataCenter
>
{
DataCenterModel
_model
;
RefreshController
_refreshController
=
RefreshController
(
initialRefresh:
false
);
DataCenterState
()
{
_model
=
DataCenterModel
();
}
@override
void
initState
()
{
super
.
initState
();
_model
.
init
(
context
);
}
@override
void
dispose
()
{
_model
.
dispose
();
_refreshController
.
dispose
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
MyAppBar
(),
body:
refreshView
(
_refreshController
,
_onLoading
,
topTitle
(),
renderList
()),
);
}
void
_onLoading
()
{
//TODO
Timer
(
Duration
(
seconds:
1
),
()
{
_refreshController
.
refreshCompleted
();
});
}
Widget
renderList
()
{
return
StreamBuilder
(
stream:
_model
.
liveData
.
stream
,
initialData:
_model
.
liveData
.
data
,
builder:
(
context
,
data
)
{
if
(
data
.
data
==
null
)
{
return
refreshloadingItem
((){
});
}
return
SliverPadding
(
padding:
EdgeInsets
.
only
(
right:
300
,
left:
20
),
sliver:
SliverGrid
(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
5
,
childAspectRatio:
0.9
),
delegate:
SliverChildBuilderDelegate
(
(
BuildContext
context
,
int
index
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
print
(
"clickk "
);
},
child:
Card
(
shape:
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
15.0
))),
//设置圆角
elevation:
5
,
margin:
EdgeInsets
.
all
(
10
),
child:
Column
(
children:
<
Widget
>[
Container
(
width:
double
.
maxFinite
,
height:
160
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
vertical
(
top:
Radius
.
circular
(
15
)),
child:
Image
.
network
(
"http://b-ssl.duitang.com/uploads/item/201208/30/20120830173930_PBfJE.jpeg"
,
fit:
BoxFit
.
cover
,
)),
),
Container
(
width:
double
.
maxFinite
,
height:
1
,
color:
Colors
.
black12
,
),
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
left:
16
,
top:
5
,
),
child:
baseText
(
"www"
,
15
,
Colors
.
black
),
),
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
left:
16
,
top:
5
,
right:
16
),
child:
Row
(
children:
<
Widget
>[
baseText
(
"www"
,
12
,
Colors
.
black
),
Expanded
(
child:
Container
(),
),
baseText
(
"0/8"
,
12
,
Colors
.
black
)
],
),
),
],
),
));
})));
},
);
}
Widget
topTitle
()
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
baseButton
(()
{
//TODO
},
EdgeInsets
.
fromLTRB
(
10
,
20
,
10
,
20
),
"新建数据集"
),
Container
(
margin:
EdgeInsets
.
only
(
left:
30
,
bottom:
5
),
child:
baseText
(
"数据集"
,
12
,
Colors
.
black
),
),
StreamBuilder
(
stream:
_model
.
countLive
.
stream
,
initialData:
_model
.
countLive
.
data
,
builder:
(
con
,
data
)
{
int
all
=
0
;
if
(
data
.
data
!=
null
)
{
all
=
data
.
data
;
}
return
Container
(
margin:
EdgeInsets
.
only
(
left:
30
,
bottom:
10
),
child:
baseText
(
"总共
${all}
"
,
12
,
Colors
.
black
),
);
},
)
],
);
}
}
lib/HomeModel/page/data/DataCenterModel.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
import
'package:example_flutter/HomeModel/service/remote/entity/DataBean.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
class
DataCenterModel
extends
BaseModel
{
LiveData
<
DataBean
>
liveData
=
new
LiveData
();
LiveData
<
int
>
countLive
=
new
LiveData
();
DataCenterModel
();
@override
void
dispose
()
{
liveData
.
dispost
();
countLive
.
dispost
();
}
void
init
(
BuildContext
context
)
{
liveData
.
notifyView
(
new
DataBean
());
}
}
\ No newline at end of file
lib/HomeModel/page/home/HomeModel.dart
View file @
14bfc57b
...
@@ -10,6 +10,7 @@ import 'package:dio/dio.dart';
...
@@ -10,6 +10,7 @@ import 'package:dio/dio.dart';
import
'package:example_flutter/HomeModel/page/picture/PicPage.dart'
;
import
'package:example_flutter/HomeModel/page/picture/PicPage.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkPage.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkPage.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/AllProjectBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/picker/base/BasePickerComponent.dart'
;
import
'package:example_flutter/commonModel/picker/base/BasePickerComponent.dart'
;
...
@@ -20,15 +21,24 @@ import 'package:flutter/foundation.dart';
...
@@ -20,15 +21,24 @@ import 'package:flutter/foundation.dart';
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:file_chooser/file_chooser.dart'
;
import
'package:file_chooser/file_chooser.dart'
;
import
'UploadBean.dart'
;
class
HomeModel
extends
BaseModel
{
class
HomeModel
extends
BaseModel
{
HomeRepo
repo
=
HomeRepo
.
getInstance
();
HomeRepo
repo
=
HomeRepo
.
getInstance
();
List
<
UploadResultBean
>
scanList
=
new
List
();
List
<
UploadResultBean
>
scanList
=
new
List
();
int
allSize
;
int
allSize
;
int
nowSize
;
int
nowSize
;
List
<
String
>
uploadFile
=
new
List
();
List
<
String
>
uploadFile
=
new
List
();
LiveData
<
List
<
UploadItem
>>
uploadLive
=
new
LiveData
();
@override
@override
void
dispose
()
{}
void
dispose
()
{
uploadLive
.
dispost
();
}
init
()
{
// allprojectLive.notifyView(AllProjectBean("w"));
}
void
scanImages
(
BuildContext
context
)
async
{
void
scanImages
(
BuildContext
context
)
async
{
await
showOpenPanel
((
result
,
files
)
{
await
showOpenPanel
((
result
,
files
)
{
...
@@ -36,10 +46,13 @@ class HomeModel extends BaseModel {
...
@@ -36,10 +46,13 @@ class HomeModel extends BaseModel {
Toast
.
show
(
context
,
"没有选择文件 批量上传 可以按住shift 或者拖拽鼠标!"
);
Toast
.
show
(
context
,
"没有选择文件 批量上传 可以按住shift 或者拖拽鼠标!"
);
return
;
return
;
}
}
BaseCenterPicker
()
List
<
UploadItem
>
items
=
new
List
();
..
setPicker
(
BaseLoadingItem
(
"上传中..."
))
files
.
forEach
((
value
)
{
..
show
(
context
);
items
.
add
(
new
UploadItem
()
allSize
=
files
.
length
;
..
path
=
value
);
});
uploadLive
.
notifyView
(
items
);
allSize
=
files
.
length
;
nowSize
=
0
;
nowSize
=
0
;
scanList
.
clear
();
scanList
.
clear
();
uploadFile
.
clear
();
uploadFile
.
clear
();
...
@@ -48,35 +61,38 @@ class HomeModel extends BaseModel {
...
@@ -48,35 +61,38 @@ class HomeModel extends BaseModel {
},
allowsMultipleSelection:
true
);
},
allowsMultipleSelection:
true
);
}
}
void
uploadImage
(
void
uploadImage
(
BuildContext
context
,
BuildContext
context
,
String
path
,)
{
String
path
,
)
{
netUpload
(
path
).
then
((
value
)
{
netUpload
(
path
).
then
((
value
)
{
if
(
value
!=
null
&&
if
(
value
!=
null
&&
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
uploadLive
.
data
[
nowSize
].
state
=
1
;
uploadLive
.
notifyView
(
uploadLive
.
data
);
nowSize
++;
nowSize
++;
if
(
allSize
==
nowSize
)
{
if
(
allSize
==
nowSize
)
{
Toast
.
show
(
context
,
"上传成功"
);
Toast
.
show
(
context
,
"上传成功"
);
// repo.updateScanList(scanList);
// repo.updateScanList(scanList);
success
(
context
);
success
(
context
);
}
else
{
}
else
{
uploadImage
(
context
,
uploadFile
[
nowSize
]);
uploadImage
(
context
,
uploadFile
[
nowSize
]);
}
}
}
else
{
}
else
{
Toast
.
show
(
context
,
"上传图片返回接口有空值 暂停上传"
);
Toast
.
show
(
context
,
"上传图片返回接口有空值 暂停上传"
);
print
(
"上传图片返回接口有空值 暂停上传"
);
print
(
"上传图片返回接口有空值 暂停上传"
);
Navigator
.
pop
(
context
);
}
}
}).
catchError
((
erro
)
{
}).
catchError
((
erro
)
{
Toast
.
show
(
context
,
erro
.
toString
());
Toast
.
show
(
context
,
erro
.
toString
());
print
(
erro
.
toString
());
print
(
erro
.
toString
());
Navigator
.
pop
(
context
);
uploadLive
.
data
[
nowSize
].
state
=
2
;
uploadLive
.
notifyView
(
uploadLive
.
data
);
nowSize
++;
if
(
nowSize
<
allSize
)
{
uploadImage
(
context
,
uploadFile
[
nowSize
]);
}
});
});
}
}
void
success
(
BuildContext
buildContext
)
{
void
success
(
BuildContext
buildContext
)
{
Navigator
.
pop
(
buildContext
);
Navigator
.
push
(
buildContext
,
CustomRoute
(
PicPage
()));
Navigator
.
push
(
buildContext
,
CustomRoute
(
PicPage
()));
}
}
}
}
...
...
lib/HomeModel/page/home/HomePage.dart
View file @
14bfc57b
...
@@ -2,24 +2,48 @@
...
@@ -2,24 +2,48 @@
* @author lsy
* @author lsy
* @date 2019-11-07
* @date 2019-11-07
**/
**/
import
'dart:async'
;
import
'dart:io'
;
import
'package:event_bus/event_bus.dart'
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/page/createProject/CreateProject.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomeModel.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomeModel.dart'
;
import
'package:example_flutter/HomeModel/page/home/UploadHideView.dart'
;
import
'package:example_flutter/HomeModel/page/picture/PicPage.dart'
;
import
'package:example_flutter/HomeModel/page/picture/PicPage.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkPage.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/AllProjectBean.dart'
;
import
'package:example_flutter/HomeModel/util/JumpUtil.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/eventbus/event/LogoutEvent.dart'
;
import
'package:example_flutter/main.dart'
;
import
'package:example_flutter/res/GMRes.dart'
;
import
'package:example_flutter/res/GMRes.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_animation_set/widget/transition_animations.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:pull_to_refresh/pull_to_refresh.dart'
;
import
'UploadBean.dart'
;
class
HomePage
extends
StatefulWidget
{
class
HomePage
extends
StatefulWidget
{
@override
@override
State
<
StatefulWidget
>
createState
()
=>
HomeState
();
State
<
StatefulWidget
>
createState
()
=>
HomeState
();
}
}
class
HomeState
extends
State
<
HomePage
>
{
class
HomeState
extends
BaseState
<
HomePage
>
with
SingleTickerProviderStateMixin
{
HomeModel
_model
;
HomeModel
_model
;
Size
screenSize
;
Size
screenSize
;
String
userName
;
RefreshController
_refreshController
=
RefreshController
(
initialRefresh:
false
);
Animation
<
double
>
animation
;
AnimationController
controller
;
double
animValue
=
0.0
;
HomeState
()
{
HomeState
()
{
_model
=
new
HomeModel
();
_model
=
new
HomeModel
();
...
@@ -28,38 +52,170 @@ class HomeState extends State<HomePage> {
...
@@ -28,38 +52,170 @@ class HomeState extends State<HomePage> {
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
_model
.
init
();
// controller = new AnimationController(
// duration: const Duration(milliseconds: 3000), vsync: this);
// animation = new Tween(begin: 0.0, end: 1.0).animate(controller)
// ..addListener(() {
// animValue = controller.value;
// });
// controller.repeat();
}
@override
void
dispose
()
{
// controller.dispose();
_refreshController
.
dispose
();
_model
.
dispose
();
super
.
dispose
();
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
screenSize
=
MediaQuery
.
of
(
context
).
size
;
screenSize
=
MediaQuery
.
of
(
context
).
size
;
String
userName
=
userName
=
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
"userName"
);
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
"userName"
);
return
Scaffold
(
return
Scaffold
(
// appBar: AppBar(
appBar:
MyAppBar
(),
// leading: Text(""),
body:
// backgroundColor: ALColors.Color5276F4,
refreshView
(
_refreshController
,
_onLoading
,
topTitle
(),
renderList
()),
// actions: <Widget>[
);
// Expanded(
}
// child: Container(),
// ),
void
_onLoading
()
{
// Container(
//TODO
// margin: EdgeInsets.only(right: ScreenUtil.instance.setWidth(10)),
Timer
(
Duration
(
seconds:
1
),
()
{
// alignment: Alignment.center,
_refreshController
.
refreshCompleted
();
// child: baseText(userName, 30, ALColors.ColorF8F8F8),
});
// ),
}
// Container(
// width: kToolbarHeight,
Widget
renderList
()
{
// height: kToolbarHeight,
return
StreamBuilder
<
List
<
UploadItem
>>(
// margin: EdgeInsets.only(
stream:
_model
.
uploadLive
.
stream
,
// left: ScreenUtil.instance.setWidth(5),
initialData:
_model
.
uploadLive
.
data
,
// right: ScreenUtil.instance.setWidth(50),
builder:
(
context
,
data
)
{
// top: 5,
if
(
data
.
data
==
null
)
{
// bottom: 5),
return
refreshloadingItem
(()
{
// child: SvgPicture.asset("image/Face.svg"),
_model
.
scanImages
(
context
);
});
}
return
SliverPadding
(
padding:
EdgeInsets
.
only
(
right:
300
,
left:
20
),
sliver:
SliverGrid
(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
5
,
childAspectRatio:
0.9
),
delegate:
SliverChildBuilderDelegate
(
(
BuildContext
context
,
int
index
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
print
(
"clickk "
);
},
child:
Stack
(
children:
<
Widget
>[
PicItem
(
data
.
data
[
index
].
path
),
_model
.
nowSize
==
index
&&
data
.
data
[
index
].
state
==
0
?
Container
(
margin:
EdgeInsets
.
all
(
25
),
alignment:
Alignment
.
center
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
Container
(
width:
40
,
height:
40
,
child:
MyYYRotatingCircle
(
Colors
.
orange
),
))
:
Container
(
margin:
EdgeInsets
.
all
(
10
),
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
CustomPaint
(
painter:
UploadHideView
(
data
.
data
[
index
].
state
,
animValue
,
data
.
data
[
index
].
progress
)),
),
],
));
},
childCount:
data
.
data
.
length
)));
},
);
}
Widget
PicItem
(
String
path
)
{
return
Card
(
shape:
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
15.0
))),
//设置圆角
elevation:
5
,
margin:
EdgeInsets
.
all
(
10
),
child:
Column
(
children:
<
Widget
>[
Container
(
width:
double
.
maxFinite
,
height:
160
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
vertical
(
top:
Radius
.
circular
(
15
)),
child:
Image
.
file
(
File
(
path
),
fit:
BoxFit
.
cover
,
)),
),
Container
(
width:
double
.
maxFinite
,
height:
1
,
color:
Colors
.
black12
,
),
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
left:
16
,
top:
15
,
),
child:
baseText
(
path
.
substring
(
path
.
lastIndexOf
(
"/"
)
+
1
,
path
.
length
),
15
,
Colors
.
black
),
),
// Container(
// alignment: Alignment.topLeft,
// margin:
// EdgeInsets.only(left: 16, top: 5, right: 16),
// child: Row(
// children: <Widget>[
// baseText("www", 12, Colors.black),
// Expanded(
// child: Container(),
// ),
// baseText("0/8", 12, Colors.black)
// ],
// ),
// ),
// ]),
// ),
body:
uploadItem
(),
],
),
);
}
Widget
topTitle
()
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Row
(
children:
<
Widget
>[
baseButton
(()
{
_model
.
scanImages
(
context
);
},
EdgeInsets
.
fromLTRB
(
10
,
20
,
10
,
20
),
"上传图片"
),
baseButton
(()
{
JumpUtil
.
jumpToPage
(
context
,
WorkPage
(
"http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg"
,
1
,
0
));
},
EdgeInsets
.
fromLTRB
(
10
,
20
,
10
,
20
),
"下一步"
),
],
),
Container
(
margin:
EdgeInsets
.
only
(
left:
30
,
bottom:
10
),
child:
baseText
(
"全部图片"
,
12
,
Colors
.
black
),
),
],
);
);
}
}
...
@@ -107,8 +263,7 @@ class HomeState extends State<HomePage> {
...
@@ -107,8 +263,7 @@ class HomeState extends State<HomePage> {
child:
baseText
(
"跳过"
,
15
,
Colors
.
white
),
child:
baseText
(
"跳过"
,
15
,
Colors
.
white
),
)),
)),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(),
),
),
),
SvgPicture
.
asset
(
"image/add.svg"
),
SvgPicture
.
asset
(
"image/add.svg"
),
Container
(
Container
(
...
...
lib/HomeModel/page/home/UploadBean.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-05
**/
class
UploadItem
{
String
path
;
//0 loading 1success 2fail
int
state
=
0
;
double
progress
=
0.0
;
}
\ No newline at end of file
lib/HomeModel/page/home/UploadHideView.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-11-22
**/
import
'dart:async'
;
import
'dart:ui'
;
import
'package:example_flutter/HomeModel/base/bean/PointItem.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_animation_set/animation_set.dart'
;
import
'dart:ui'
as
ui
;
import
'dart:math'
as
math
;
import
'package:flutter_animation_set/animator.dart'
;
class
MyYYRotatingCircle
extends
StatelessWidget
{
Color
color
;
MyYYRotatingCircle
(
this
.
color
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
width:
40
,
height:
40
,
child:
Stack
(
children:
<
Widget
>[
AnimatorSet
(
child:
Container
(
decoration:
BoxDecoration
(
color:
color
,
shape:
BoxShape
.
circle
,
),
width:
100
,
height:
100
,
),
animatorSet:
[
RX
(
from:
0.0
,
to:
math
.
pi
,
duration:
500
,
curve:
Curves
.
easeIn
),
RY
(
from:
0.0
,
to:
math
.
pi
,
duration:
500
,
curve:
Curves
.
easeOut
),
],
),
],
),
);
}
}
class
UploadHideView
extends
CustomPainter
{
double
animValue
;
double
progressValue
;
int
state
;
UploadHideView
(
this
.
state
,
this
.
animValue
,
this
.
progressValue
);
Paint
ImagePaint
=
new
Paint
()..
isAntiAlias
=
true
;
Paint
circlePaint
=
new
Paint
()
..
isAntiAlias
=
true
..
color
=
Colors
.
black38
..
style
=
PaintingStyle
.
fill
;
Paint
rectPaint
=
new
Paint
()
..
isAntiAlias
=
true
..
color
=
Colors
.
red
..
strokeWidth
=
5
..
style
=
PaintingStyle
.
stroke
..
strokeCap
=
StrokeCap
.
round
;
Path
path
=
new
Path
();
@override
void
paint
(
Canvas
canvas
,
Size
size
)
{
RRect
rect1
=
RRect
.
fromRectAndRadius
(
new
Rect
.
fromLTWH
(
0
,
0
,
size
.
width
,
size
.
height
),
Radius
.
circular
(
15.0
));
canvas
.
clipRRect
(
rect1
);
if
(
state
==
0
)
{
// if (progressValue == 0.1) {
// canvas.drawRect(
// Rect.fromLTWH(0, 0, size.width, size.height), circlePaint);
// } else {
// double rowHeight = size.width / 15;
// path.moveTo(0, 0);
// path.relativeLineTo(size.width * 3, 0);
// path.relativeLineTo(0, size.height / 2);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, -rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, -rowHeight, -size.width / 3, 0);
//
// path.relativeCubicTo(
// 0, 0, -size.width / 6, rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, -rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, rowHeight, -size.width / 3, 0);
//
// path.relativeCubicTo(
// 0, 0, -size.width / 6, -rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, rowHeight, -size.width / 3, 0);
// path.relativeCubicTo(
// 0, 0, -size.width / 6, -rowHeight, -size.width / 3, 0);
//
// path.close();
//
// canvas.save();
// canvas.translate(-size.width * 2 * animValue, 0);
// canvas.drawPath(path, circlePaint);
// canvas.restore();
// }
}
else
if
(
state
==
1
)
{
canvas
.
save
();
canvas
.
translate
(
size
.
width
-
30
,
size
.
height
-
30
);
Path
path
=
new
Path
();
path
.
moveTo
(-
10
,
-
10
);
path
.
lineTo
(
0
,
0
);
path
.
lineTo
(
22
,
-
22
);
canvas
.
drawPath
(
path
,
rectPaint
);
// TextPainter(
// text: TextSpan(
// text: "这个图片不符合标准哦~",
// style: TextStyle(
// fontSize: 13,
// color: Colors.yellow,
// fontWeight: FontWeight.w300)),
// textDirection: TextDirection.ltr,
// textAlign: TextAlign.center)
// ..layout(maxWidth: 150, minWidth: 30)
// ..paint(canvas, Offset(-60, - 30));
canvas
.
restore
();
}
else
if
(
state
==
2
)
{
canvas
.
save
();
canvas
.
translate
(
size
.
width
/
2
,
size
.
height
/
2
);
canvas
.
rotate
(
0.3
);
TextPainter
(
text:
TextSpan
(
text:
"这个图片不符合标准哦~"
,
style:
TextStyle
(
fontSize:
13
,
color:
Colors
.
yellow
,
fontWeight:
FontWeight
.
w300
)),
textDirection:
TextDirection
.
ltr
,
textAlign:
TextAlign
.
center
)
..
layout
(
maxWidth:
150
,
minWidth:
30
)
..
paint
(
canvas
,
Offset
(-
60
,
-
30
));
canvas
.
drawLine
(
Offset
(-
30
,
30
),
Offset
(
30
,
-
30
),
rectPaint
);
canvas
.
drawLine
(
Offset
(
30
,
30
),
Offset
(-
30
,
-
30
),
rectPaint
);
canvas
.
restore
();
}
}
@override
bool
shouldRepaint
(
CustomPainter
oldDelegate
)
{
return
true
;
}
}
lib/HomeModel/page/picture/PicModel.dart
View file @
14bfc57b
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
**/
**/
import
'dart:io'
;
import
'dart:io'
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkModel.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkModel.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkPage.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkPage.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
...
@@ -27,6 +28,10 @@ class PicModel extends BaseModel {
...
@@ -27,6 +28,10 @@ class PicModel extends BaseModel {
countLive
.
notifyView
(
_repo
.
currentPage
);
countLive
.
notifyView
(
_repo
.
currentPage
);
}
}
HomeRepo
getRepo
(){
return
_repo
;
}
void
getImages
(
BuildContext
context
,
bool
showPop
)
{
void
getImages
(
BuildContext
context
,
bool
showPop
)
{
if
(
showPop
)
{
if
(
showPop
)
{
BaseCenterPicker
()
BaseCenterPicker
()
...
...
lib/HomeModel/page/picture/PicPage.dart
View file @
14bfc57b
...
@@ -6,6 +6,8 @@ import 'package:example_flutter/HomeModel/base/BaseTitle.dart';
...
@@ -6,6 +6,8 @@ import 'package:example_flutter/HomeModel/base/BaseTitle.dart';
import
'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/TotalImageBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/TotalImageBean.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/commonModel/base/SaveKey.dart'
;
import
'package:example_flutter/res/GMRes.dart'
;
import
'package:example_flutter/res/GMRes.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -16,7 +18,7 @@ class PicPage extends StatefulWidget {
...
@@ -16,7 +18,7 @@ class PicPage extends StatefulWidget {
State
<
StatefulWidget
>
createState
()
=>
PicState
();
State
<
StatefulWidget
>
createState
()
=>
PicState
();
}
}
class
PicState
extends
State
<
PicPage
>
{
class
PicState
extends
Base
State
<
PicPage
>
{
PicModel
_model
;
PicModel
_model
;
Size
screenSize
;
Size
screenSize
;
...
@@ -29,10 +31,21 @@ class PicState extends State<PicPage> {
...
@@ -29,10 +31,21 @@ class PicState extends State<PicPage> {
super
.
initState
();
super
.
initState
();
_model
.
getImages
(
context
,
false
);
_model
.
getImages
(
context
,
false
);
_model
.
getTotalImages
(
context
);
_model
.
getTotalImages
(
context
);
// getString(context, PAGE_SAVE, (value) {
// try {
// print("GETVALUEEE ${value}");
// var parse = int.parse(value);
// _model.getRepo().currentPage = parse;
// _model.getImages(context, false);
// _model.getTotalImages(context);
// } catch (e) {
// }
// });
}
}
@override
@override
void
dispose
()
{
void
dispose
()
{
saveString
(
PAGE_SAVE
,
"
${_model.getRepo().currentPage}
"
);
_model
.
dispose
();
_model
.
dispose
();
super
.
dispose
();
super
.
dispose
();
}
}
...
@@ -41,10 +54,11 @@ class PicState extends State<PicPage> {
...
@@ -41,10 +54,11 @@ class PicState extends State<PicPage> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
screenSize
=
MediaQuery
.
of
(
context
).
size
;
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
return
Scaffold
(
appBar:
getBaseTitle
(
context
),
//
appBar: getBaseTitle(context),
body:
Column
(
body:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
children:
<
Widget
>[
basehead
(
context
),
sync
(
context
),
sync
(
context
),
Expanded
(
Expanded
(
child:
imageList
(
context
),
child:
imageList
(
context
),
...
@@ -85,8 +99,8 @@ class PicState extends State<PicPage> {
...
@@ -85,8 +99,8 @@ class PicState extends State<PicPage> {
height:
double
.
maxFinite
,
height:
double
.
maxFinite
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
child:
Container
(
child:
Container
(
width:
screenSize
.
height
-
80
-
58
,
width:
screenSize
.
height
-
80
-
58
,
height:
screenSize
.
height
-
80
-
58
,
height:
screenSize
.
height
-
80
-
58
,
child:
GridView
.
count
(
child:
GridView
.
count
(
crossAxisCount:
3
,
crossAxisCount:
3
,
mainAxisSpacing:
2.0
,
mainAxisSpacing:
2.0
,
...
...
lib/HomeModel/page/work/WorkModel.dart
View file @
14bfc57b
...
@@ -6,6 +6,7 @@ import 'dart:async';
...
@@ -6,6 +6,7 @@ import 'dart:async';
import
'dart:io'
;
import
'dart:io'
;
import
'dart:math'
;
import
'dart:math'
;
import
'dart:ui'
as
ui
;
import
'dart:ui'
as
ui
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/base/bean/PointItem.dart'
;
import
'package:example_flutter/HomeModel/base/bean/PointItem.dart'
;
import
'package:example_flutter/HomeModel/page/work/temp.dart'
;
import
'package:example_flutter/HomeModel/page/work/temp.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
import
'package:example_flutter/HomeModel/service/HomeRepo.dart'
;
...
@@ -586,8 +587,9 @@ class WorkModel extends BaseModel {
...
@@ -586,8 +587,9 @@ class WorkModel extends BaseModel {
List
<
int
>
uploadList
=
[];
List
<
int
>
uploadList
=
[];
pointItem
.
list
.
forEach
((
off
)
{
pointItem
.
list
.
forEach
((
off
)
{
uploadList
.
add
((
off
.
dx
*
picScare
).
toInt
());
uploadList
.
add
((
off
.
dx
*
picScare
).
toInt
());
if
(
topAdd
>
0
)
{
print
(
"TOPPPP AADD
${topAdd}
${topBuf}
"
);
uploadList
.
add
(((
off
.
dy
+
topAdd
)
*
picScare
).
toInt
());
if
(
topAdd
<
0
)
{
uploadList
.
add
(((
off
.
dy
-
topAdd
)
*
picScare
).
toInt
());
}
else
{
}
else
{
uploadList
.
add
(((
off
.
dy
-
topBuf
)
*
picScare
).
toInt
());
uploadList
.
add
(((
off
.
dy
-
topBuf
)
*
picScare
).
toInt
());
}
}
...
@@ -602,30 +604,58 @@ class WorkModel extends BaseModel {
...
@@ -602,30 +604,58 @@ class WorkModel extends BaseModel {
String
uploadPath
=
String
uploadPath
=
"
${dir}
/sign
${DateTime.now().millisecondsSinceEpoch}
.jpeg"
;
"
${dir}
/sign
${DateTime.now().millisecondsSinceEpoch}
.jpeg"
;
toImage
(
uploadList
,
uploadPath
,
savePath
).
whenComplete
(()
{
toImage
(
uploadList
,
uploadPath
,
savePath
).
whenComplete
(()
{
File
(
savePath
).
delete
();
HomeRepo
.
getInstance
()
// HomeRepo.getInstance()
.
maskImage
(
uploadPath
,
imageId
,
maskExplain
[
maskTabLive
.
data
],
// .maskImage(uploadPath, imageId, maskExplain[maskTabLive.data],
listToUi
(
pointItem
.
list
))
// listToUi(pointItem.list))
.
listen
((
value
)
{
// .listen((value) {
if
(
value
!=
null
)
{
// if (value != null) {
Toast
.
show
(
context
,
"保存成功"
);
// Toast.show(context, "保存成功");
Navigator
.
pop
(
context
);
// Navigator.pop(context);
// File(uploadPath).delete();
// Navigator.pop(context);
// }
// }).onError((error) {
// Toast.show(context, error.toString());
// print(error.toString());
// Navigator.pop(context);
// });
//TODO HERE WWWWw
String
realSavePath
=
"
${dir}
/mask
${DateTime.now().millisecondsSinceEpoch}
.png"
;
_repo
.
uploadMyImage
(
uploadPath
,
"
${imageId}
"
).
listen
((
value
){
_repo
.
downloadMyImage
(
realSavePath
,
value
.
fileId
,(){
print
(
"UPLOAD MY OKKKKK"
);
// toImageTest(uploadList, "${dir}/test${DateTime.now().millisecondsSinceEpoch}.jpeg",savePath ).whenComplete((){});
File
(
savePath
).
delete
();
File
(
uploadPath
).
delete
();
File
(
uploadPath
).
delete
();
Navigator
.
pop
(
context
);
// Timer(Duration(seconds: 2),(){
}
HomeRepo
.
getInstance
()
}).
onError
((
error
)
{
.
maskImage
(
realSavePath
,
imageId
,
maskExplain
[
maskTabLive
.
data
],
listToUi
(
pointItem
.
list
))
.
listen
((
value
)
{
if
(
value
!=
null
)
{
Toast
.
show
(
context
,
"保存成功"
);
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
}
}).
onError
((
error
)
{
Toast
.
show
(
context
,
error
.
toString
());
print
(
error
.
toString
());
Navigator
.
pop
(
context
);
});
// });
});
}).
onError
((
error
){
Toast
.
show
(
context
,
error
.
toString
());
Toast
.
show
(
context
,
error
.
toString
());
print
(
error
.
toString
());
print
(
error
.
toString
());
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
});
});
// String realUploadPath =
// "${dir}/mask${DateTime.now().millisecondsSinceEpoch}.png";
// opencvMethod(uploadPath, realUploadPath).whenComplete(() {
// print("!!!!!!!! ${uploadPath} ${realUploadPath}");
// Navigator.pop(context);
// }).catchError((error) {
// print(error.toString());
// });
}).
catchError
((
error
)
{
}).
catchError
((
error
)
{
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
Toast
.
show
(
context
,
"保存失败"
);
Toast
.
show
(
context
,
"保存失败"
);
...
@@ -714,6 +744,7 @@ class WorkModel extends BaseModel {
...
@@ -714,6 +744,7 @@ class WorkModel extends BaseModel {
HomeRepo
.
getInstance
()
HomeRepo
.
getInstance
()
.
getMaskInfo
(
imageId
,
maskExplain
[
maskTabLive
.
data
])
.
getMaskInfo
(
imageId
,
maskExplain
[
maskTabLive
.
data
])
.
listen
((
value
)
{
.
listen
((
value
)
{
print
(
value
.
picurl
);
if
(
value
!=
null
&&
value
.
ui
!=
null
&&
value
.
ui
.
isNotEmpty
)
{
if
(
value
!=
null
&&
value
.
ui
!=
null
&&
value
.
ui
.
isNotEmpty
)
{
pointItem
.
list
=
uiToList
(
value
.
ui
);
pointItem
.
list
=
uiToList
(
value
.
ui
);
pointItem
.
drawPath
=
true
;
pointItem
.
drawPath
=
true
;
...
@@ -727,69 +758,3 @@ class WorkModel extends BaseModel {
...
@@ -727,69 +758,3 @@ class WorkModel extends BaseModel {
});
});
}
}
}
}
class
SurePicker
implements
ICenterPicker
{
VoidCallback
cancel
;
VoidCallback
sure
;
final
String
showText
;
SurePicker
(
this
.
showText
,
this
.
cancel
,
this
.
sure
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
20
))),
width:
350
,
height:
260
,
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Container
(
alignment:
Alignment
.
center
,
child:
baseText
(
showText
,
15
,
Colors
.
black
),
),
),
Container
(
height:
1
,
width:
double
.
maxFinite
,
color:
Colors
.
black54
,
),
Container
(
width:
double
.
maxFinite
,
height:
50
,
child:
Row
(
children:
<
Widget
>[
Expanded
(
child:
GestureDetector
(
onTap:
cancel
,
child:
Container
(
color:
Colors
.
transparent
,
alignment:
Alignment
.
center
,
child:
baseText
(
"取消"
,
12
,
Colors
.
black38
),
)),
),
Container
(
width:
1
,
height:
double
.
maxFinite
,
color:
Colors
.
black54
,
),
Expanded
(
child:
GestureDetector
(
onTap:
sure
,
child:
Container
(
color:
Colors
.
transparent
,
alignment:
Alignment
.
center
,
child:
baseText
(
"确定"
,
12
,
Colors
.
red
),
),
),
)
],
),
)
],
),
);
}
}
lib/HomeModel/page/work/WorkPage.dart
View file @
14bfc57b
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
**/
**/
import
'dart:ui'
as
ui
;
import
'dart:ui'
as
ui
;
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/HomeModel/base/bean/PointItem.dart'
;
import
'package:example_flutter/HomeModel/base/bean/PointItem.dart'
;
import
'package:example_flutter/HomeModel/base/view/WorkView.dart'
;
import
'package:example_flutter/HomeModel/base/view/WorkView.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkModel.dart'
;
import
'package:example_flutter/HomeModel/page/work/WorkModel.dart'
;
...
@@ -11,6 +12,7 @@ import 'package:example_flutter/HomeModel/service/remote/entity/AllTabBean.dart'
...
@@ -11,6 +12,7 @@ import 'package:example_flutter/HomeModel/service/remote/entity/AllTabBean.dart'
import
'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/commonModel/base/MySeparator.dart'
;
import
'package:example_flutter/commonModel/base/MySeparator.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/dragScare/flutter_drag_scale.dart'
;
import
'package:example_flutter/commonModel/dragScare/flutter_drag_scale.dart'
;
...
@@ -32,7 +34,7 @@ class WorkPage extends StatefulWidget {
...
@@ -32,7 +34,7 @@ class WorkPage extends StatefulWidget {
State
<
StatefulWidget
>
createState
()
=>
WorkState
(
url
,
id
,
currentIndex
);
State
<
StatefulWidget
>
createState
()
=>
WorkState
(
url
,
id
,
currentIndex
);
}
}
class
WorkState
extends
State
<
WorkPage
>
{
class
WorkState
extends
Base
State
<
WorkPage
>
{
WorkModel
_model
;
WorkModel
_model
;
Size
screenSize
;
Size
screenSize
;
double
tabItemHeight
;
double
tabItemHeight
;
...
@@ -75,44 +77,46 @@ class WorkState extends State<WorkPage> {
...
@@ -75,44 +77,46 @@ class WorkState extends State<WorkPage> {
String
userName
=
String
userName
=
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
"userName"
);
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
"userName"
);
return
Scaffold
(
return
Scaffold
(
appBar:
baseAppBar
(
appBar:
MyAppBar
(),
backgroundColor:
ALColors
.
Color5276F4
,
// baseAppBar(
backClick:
()
{
// backgroundColor: ALColors.Color5276F4,
BaseCenterPicker
()
// backClick: () {
..
setPicker
(
SurePicker
(
"确定返回吗?"
,
()
{
// BaseCenterPicker()
Navigator
.
pop
(
context
);
// ..setPicker(SurePicker("确定返回吗?", () {
},
()
{
// Navigator.pop(context);
Navigator
.
pop
(
context
);
// }, () {
Navigator
.
pop
(
context
);
// Navigator.pop(context);
}))
// Navigator.pop(context);
..
show
(
context
);
// }))
},
// ..show(context);
action:
<
Widget
>[
// },
Expanded
(
// action: <Widget>[
child:
Container
(),
// Expanded(
),
// child: Container(),
Container
(
// ),
margin:
EdgeInsets
.
only
(
right:
ScreenUtil
.
instance
.
setWidth
(
10
)),
// Container(
alignment:
Alignment
.
center
,
// margin: EdgeInsets.only(right: ScreenUtil.instance.setWidth(10)),
child:
baseText
(
userName
,
30
,
ALColors
.
ColorF8F8F8
),
// alignment: Alignment.center,
),
// child: baseText(userName, 30, ALColors.ColorF8F8F8),
Container
(
// ),
width:
kToolbarHeight
,
// Container(
height:
kToolbarHeight
,
// width: kToolbarHeight,
margin:
EdgeInsets
.
only
(
// height: kToolbarHeight,
left:
ScreenUtil
.
instance
.
setWidth
(
5
),
// margin: EdgeInsets.only(
right:
ScreenUtil
.
instance
.
setWidth
(
50
),
// left: ScreenUtil.instance.setWidth(5),
top:
5
,
// right: ScreenUtil.instance.setWidth(50),
bottom:
5
),
// top: 5,
child:
SvgPicture
.
asset
(
"image/Face.svg"
),
// bottom: 5),
),
// child: SvgPicture.asset("image/Face.svg"),
]),
// ),
// ]),
body:
Row
(
body:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
Stack
(
child:
Stack
(
alignment:
AlignmentDirectional
.
bottomCenter
,
alignment:
AlignmentDirectional
.
bottomCenter
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
width:
double
.
maxFinite
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
height:
double
.
maxFinite
,
...
@@ -207,81 +211,7 @@ class WorkState extends State<WorkPage> {
...
@@ -207,81 +211,7 @@ class WorkState extends State<WorkPage> {
)));
)));
},
},
),
),
Positioned
(
left:
0
,
top:
50
,
child:
Container
(
width:
double
.
maxFinite
,
height:
30
,
color:
Colors
.
blueGrey
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
StreamBuilder
<
bool
>(
stream:
_model
.
rectMaskLive
.
stream
,
initialData:
_model
.
rectMaskLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
}
return
Row
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
16
),
child:
baseText
(
"点标记"
,
15
,
Colors
.
white
),
),
Switch
(
value:
_model
.
pointItem
.
rectModel
,
activeColor:
Colors
.
blue
,
onChanged:
(
value
)
{
_model
.
pointItem
.
rectModel
=
value
;
_model
.
syncPoint
();
_model
.
rectMaskLive
.
notifyView
(
value
);
},
),
Container
(
child:
baseText
(
"拉框标记"
,
15
,
Colors
.
white
),
),
],
);
},
),
Container
(
margin:
EdgeInsets
.
only
(
left:
16
),
child:
FlatButton
(
onPressed:
()
{
_model
.
showMaskTabSelect
(
context
);
},
child:
Container
(
height:
double
.
maxFinite
,
alignment:
Alignment
.
center
,
color:
Colors
.
amberAccent
,
child:
baseText
(
"选取标签"
,
15
,
Colors
.
white
),
),
),
),
Expanded
(
child:
Container
(
alignment:
Alignment
.
centerLeft
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
StreamBuilder
(
stream:
_model
.
maskTabLive
.
stream
,
initialData:
_model
.
maskTabLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
baseText
(
"还没有选着标签哦"
,
15
,
Colors
.
white
);
}
return
baseText
(
"选着的标签:
${data.data}
"
,
15
,
Colors
.
white
);
},
),
),
),
],
),
),
),
Container
(
Container
(
width:
double
.
maxFinite
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
height:
double
.
maxFinite
,
...
@@ -469,20 +399,106 @@ class WorkState extends State<WorkPage> {
...
@@ -469,20 +399,106 @@ class WorkState extends State<WorkPage> {
),
),
],
],
)),
)),
Container
(
leftItem
(),
margin:
EdgeInsets
.
only
(
left:
2
,
right:
2
),
divide
(),
color:
Colors
.
black38
,
width:
1
,
height:
double
.
maxFinite
,
),
centerItem
(),
centerItem
(),
divide
(),
rightItem
()
],
),
);
}
Widget
divide
(){
return
Container
(
margin:
EdgeInsets
.
only
(
left:
2
,
right:
2
),
color:
Colors
.
black38
,
width:
1
,
height:
double
.
maxFinite
,
);
}
leftItem
(){
return
Container
(
width:
100
,
height:
double
.
maxFinite
,
child:
Column
(
children:
<
Widget
>[
Container
(
Container
(
margin:
EdgeInsets
.
only
(
left:
2
,
right:
2
),
height:
50
,
color:
Colors
.
black38
,
child:
StreamBuilder
<
bool
>(
width:
1
,
stream:
_model
.
rectMaskLive
.
stream
,
height:
double
.
maxFinite
,
initialData:
_model
.
rectMaskLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
}
return
Column
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
16
),
child:
baseText
(
"点标记"
,
15
,
Colors
.
white
),
),
Switch
(
value:
_model
.
pointItem
.
rectModel
,
activeColor:
Colors
.
blue
,
onChanged:
(
value
)
{
_model
.
pointItem
.
rectModel
=
value
;
_model
.
syncPoint
();
_model
.
rectMaskLive
.
notifyView
(
value
);
},
),
Container
(
child:
baseText
(
"拉框标记"
,
15
,
Colors
.
white
),
),
],
);
},
),
),
),
rightItem
()
Container
(
width:
double
.
maxFinite
,
height:
30
,
color:
Colors
.
blueGrey
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
16
),
child:
FlatButton
(
onPressed:
()
{
_model
.
showMaskTabSelect
(
context
);
},
child:
Container
(
height:
double
.
maxFinite
,
alignment:
Alignment
.
center
,
color:
Colors
.
amberAccent
,
child:
baseText
(
"选取标签"
,
15
,
Colors
.
white
),
),
),
),
Expanded
(
child:
Container
(
alignment:
Alignment
.
centerLeft
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
StreamBuilder
(
stream:
_model
.
maskTabLive
.
stream
,
initialData:
_model
.
maskTabLive
.
data
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
baseText
(
"还没有选着标签哦"
,
15
,
Colors
.
white
);
}
return
baseText
(
"选着的标签:
${data.data}
"
,
15
,
Colors
.
white
);
},
),
),
),
],
),
),
],
],
),
),
);
);
...
...
lib/HomeModel/service/HomeRepo.dart
View file @
14bfc57b
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
**/
**/
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:io'
;
import
'dart:typed_data'
;
import
'package:dio/dio.dart'
;
import
'package:dio/dio.dart'
;
import
'package:example_flutter/HomeModel/page/work/temp.dart'
;
import
'package:example_flutter/HomeModel/page/work/temp.dart'
;
...
@@ -15,9 +16,11 @@ import 'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.
...
@@ -15,9 +16,11 @@ import 'package:example_flutter/HomeModel/service/remote/entity/ImageResultBean.
import
'package:example_flutter/HomeModel/service/remote/entity/MaskResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/MaskResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/PutImageDataBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/PutImageDataBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/TotalImageBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/TotalImageBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadMyImageBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/HomeModel/service/remote/entity/UploadResultBean.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter_animation_set/animator.dart'
;
import
'package:rxdart/rxdart.dart'
;
import
'package:rxdart/rxdart.dart'
;
ImageResultBean
paseImageResult
(
String
value
)
{
ImageResultBean
paseImageResult
(
String
value
)
{
...
@@ -25,9 +28,14 @@ ImageResultBean paseImageResult(String value) {
...
@@ -25,9 +28,14 @@ ImageResultBean paseImageResult(String value) {
}
}
class
HomeRepo
{
class
HomeRepo
{
Dio
mydio
;
static
HomeRepo
_repo
;
static
HomeRepo
_repo
;
HomeRepo
.
_
();
HomeRepo
.
_
(){
mydio
=
Dio
(
getw
());
}
static
HomeRepo
getInstance
()
{
static
HomeRepo
getInstance
()
{
if
(
_repo
==
null
)
{
if
(
_repo
==
null
)
{
...
@@ -106,6 +114,8 @@ class HomeRepo {
...
@@ -106,6 +114,8 @@ class HomeRepo {
"tag"
:
tag
,
"tag"
:
tag
,
"ui"
:
ui
"ui"
:
ui
});
});
var
existsSync
=
File
(
path
).
existsSync
();
print
(
"EXITTTT
$existsSync
"
);
return
Observable
.
fromFuture
(
DioUtil
.
getInstance
()
return
Observable
.
fromFuture
(
DioUtil
.
getInstance
()
.
getDio
()
.
getDio
()
.
post
(
'maskimages/
${id}
/'
,
data:
formData
))
.
post
(
'maskimages/
${id}
/'
,
data:
formData
))
...
@@ -153,6 +163,62 @@ class HomeRepo {
...
@@ -153,6 +163,62 @@ class HomeRepo {
return
HomeApiImpl
().
getTotalImages
();
return
HomeApiImpl
().
getTotalImages
();
}
}
void
downloadMyImage
(
String
path
,
String
id
,
Function
()
ok
){
mydio
.
download
(
"api/downfile"
,
path
,
options:
Options
(
method:
"POST"
),
data:
FormData
.
from
(
{
"id"
:
id
})).
then
((
value
){
print
(
value
);
}).
whenComplete
((){
ok
();
});
// Observable.fromFuture(dio
// .post('', data:FormData.from( {"id":id})))
// .listen((value) {
//
// if (value != null &&
// (value.statusCode >= 200 && value.statusCode < 300)) {
//
//// HttpClientResponse resp = ;
//// final Uint8List bytes = consolidateHttpClientResponseBytes(resp) as Uint8List;
// File(path).writeAsStringSync(value.data.toString() );
// ok();
// }
// });
}
Observable
<
UploadMyImageBean
>
uploadMyImage
(
String
path
,
String
id
){
var
name
=
path
.
substring
(
path
.
lastIndexOf
(
"/"
)
+
1
,
path
.
length
);
FormData
formData
=
new
FormData
.
from
({
"file"
:
new
UploadFileInfo
(
new
File
(
path
),
name
),
"id"
:
id
,
});
return
Observable
.
fromFuture
(
mydio
.
post
(
'api/fileUpload'
,
data:
formData
))
.
flatMap
((
value
)
{
if
(
value
!=
null
&&
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
return
Observable
.
fromFuture
(
compute
(
parseMyUpload
,
value
.
toString
()));
}
else
{
return
Observable
.
fromFuture
(
null
);
}
});
}
BaseOptions
getw
()
{
BaseOptions
options
=
BaseOptions
();
options
.
connectTimeout
=
10
*
1000
;
options
.
receiveTimeout
=
20
*
1000
;
// options.contentType = ContentType.parse('application/x-www-form-urlencoded');
// options.contentType = ContentType.json;
options
.
responseType
=
ResponseType
.
plain
;
options
.
baseUrl
=
"http://114.67.74.194:8888/"
;
Map
<
String
,
dynamic
>
headers
=
Map
<
String
,
dynamic
>();
headers
[
'Accept'
]
=
'application/json'
;
headers
[
'version'
]
=
'1.0.0'
;
options
.
headers
=
headers
;
return
options
;
}
// Observable<>
// Observable<>
}
}
...
@@ -171,3 +237,8 @@ PutImageDataBean parsePutImageBean(String value) {
...
@@ -171,3 +237,8 @@ PutImageDataBean parsePutImageBean(String value) {
MaskResultBean
parseMaskResult
(
String
value
)
{
MaskResultBean
parseMaskResult
(
String
value
)
{
return
MaskResultBean
.
fromJson
(
json
.
decode
(
value
));
return
MaskResultBean
.
fromJson
(
json
.
decode
(
value
));
}
}
UploadMyImageBean
parseMyUpload
(
String
value
){
return
UploadMyImageBean
.
fromJson
(
json
.
decode
(
value
));
}
\ No newline at end of file
lib/HomeModel/service/remote/entity/AllProjectBean.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
class
AllProjectBean
{
String
a
;
AllProjectBean
(
this
.
a
);
}
lib/HomeModel/service/remote/entity/DataBean.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-03
**/
class
DataBean
{
}
\ No newline at end of file
lib/HomeModel/service/remote/entity/UploadMyImageBean.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-11-29
**/
class
UploadMyImageBean
{
String
fileId
;
String
filePath
;
UploadMyImageBean
({
this
.
fileId
,
this
.
filePath
});
UploadMyImageBean
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
fileId
=
json
[
'fileId'
];
filePath
=
json
[
'filePath'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'fileId'
]
=
this
.
fileId
;
data
[
'filePath'
]
=
this
.
filePath
;
return
data
;
}
}
lib/HomeModel/util/JumpUtil.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
import
'package:example_flutter/res/anim/Anim.dart'
;
import
'package:flutter/cupertino.dart'
;
class
JumpUtil
{
static
void
jumpToPage
(
BuildContext
context
,
Widget
widget
)
{
Navigator
.
of
(
context
).
push
(
CustomRoute
(
widget
,
routeWay:
RouteWay
.
ALP
));
}
static
void
jumpReplace
(
BuildContext
context
,
Widget
widget
){
Navigator
.
pushAndRemoveUntil
(
context
,
CustomRoute
(
widget
,
routeWay:
RouteWay
.
ALP
)
,
ModalRoute
.
withName
(
""
));
}
}
lib/HomePage.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-11-05
**/
import
'dart:async'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:example_flutter/res/value/ALColors.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'HomeModel.dart'
;
import
'commonModel/GMBase.dart'
;
import
'commonModel/eventbus/event/ChangeTabBean.dart'
;
import
'main.dart'
;
class
HomePage
extends
StatefulWidget
{
HomeModel
_model
;
HomePage
()
{
_model
=
new
HomeModel
();
}
@override
State
<
StatefulWidget
>
createState
()
=>
HomeState
(
_model
);
}
class
HomeState
extends
BaseState
<
HomePage
>
{
StreamSubscription
<
ChangeTabBean
>
changeTabEvent
;
HomeModel
_model
;
HomeState
(
this
.
_model
);
@override
void
initState
()
{
changeTabEvent
=
eventBus
.
on
<
ChangeTabBean
>().
listen
((
event
)
{
_model
.
currentIndex
=
event
.
index
;
_model
.
onTap
(
event
.
index
);
});
super
.
initState
();
_model
.
init
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
// bottomNavigationBar: StreamBuilder<int>(
// stream: _model.indexLive.stream,
// initialData: _model.indexLive.data,
// builder: (con, data) {
// int index = data.data ?? 0;
// return BottomNavigationBar(
// items: _model.items,
// currentIndex: index,
// onTap: (index) {
// _model.onTap(index);
// });
// }),
body:
StreamBuilder
<
int
>(
stream:
_model
.
widgetLive
.
stream
,
initialData:
_model
.
widgetLive
.
data
,
builder:
(
con
,
data
)
{
int
index
=
data
.
data
??
0
;
List
<
Widget
>
tabList
=
new
List
();
_model
.
items
.
forEach
((
value
)
{
tabList
.
add
(
baseItem
(
value
.
index
,
value
.
svgIcon
,
value
.
name
));
});
return
Column
(
children:
<
Widget
>[
Expanded
(
child:
IndexedStack
(
index:
index
,
children:
_model
.
pages
,
)),
// Container(
// decoration: BoxDecoration(boxShadow: [
// BoxShadow(
// color: Colors.black12,
// offset: Offset(0.0, 0.0), //阴影xy轴偏移量
// blurRadius: 1.0, //阴影模糊程度
// spreadRadius: 1.0 //阴影扩散程度
// )
// ]),
// height: 1,
// ),
// Container(
// color: ALColors.ColorF4F3F8,
// height: 60,
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: tabList,
// ),
// )
],
);
}));
}
Widget
baseItem
(
int
index
,
String
pic
,
String
text
)
{
return
Expanded
(
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
_model
.
currentIndex
=
index
;
_model
.
onTap
(
index
);
},
child:
Container
(
height:
60
,
alignment:
Alignment
.
center
,
child:
Column
(
children:
<
Widget
>[
Expanded
(
child:
Container
(),
),
_model
.
currentIndex
==
index
?
SvgPicture
.
asset
(
pic
,
color:
ALColors
.
Color323232
)
:
SvgPicture
.
asset
(
pic
,
color:
ALColors
.
Color999999
),
Container
(
margin:
EdgeInsets
.
only
(
top:
3
),
child:
baseText
(
text
,
12
,
_model
.
currentIndex
==
index
?
Colors
.
black
:
Colors
.
grey
),
),
Expanded
(
child:
Container
(),
),
],
))));
}
@override
void
dispose
()
{
changeTabEvent
.
cancel
();
_model
.
dispose
();
super
.
dispose
();
}
}
lib/UserModel/UserRouter.dart
View file @
14bfc57b
...
@@ -12,4 +12,5 @@ import 'package:flutter/cupertino.dart';
...
@@ -12,4 +12,5 @@ import 'package:flutter/cupertino.dart';
abstract
class
UserRouter
extends
RouterBaser
{
abstract
class
UserRouter
extends
RouterBaser
{
Widget
getLoginPage
();
Widget
getLoginPage
();
Widget
getPersionPage
();
}
}
\ No newline at end of file
lib/UserModel/UserRouterImpl.dart
View file @
14bfc57b
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
import
'package:example_flutter/UserModel/UserRouter.dart'
;
import
'package:example_flutter/UserModel/UserRouter.dart'
;
import
'package:example_flutter/UserModel/page/login/LoginPage.dart'
;
import
'package:example_flutter/UserModel/page/login/LoginPage.dart'
;
import
'package:example_flutter/UserModel/page/usermanager/Persionset.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
class
UserRouterImpl
implements
UserRouter
{
class
UserRouterImpl
implements
UserRouter
{
...
@@ -12,4 +13,9 @@ class UserRouterImpl implements UserRouter {
...
@@ -12,4 +13,9 @@ class UserRouterImpl implements UserRouter {
Widget
getLoginPage
()
{
Widget
getLoginPage
()
{
return
LoginPage
();
return
LoginPage
();
}
}
@override
Widget
getPersionPage
()
{
return
Persionset
();
}
}
}
lib/UserModel/page/login/LoginModel.dart
View file @
14bfc57b
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
import
'dart:io'
;
import
'dart:io'
;
import
'package:example_flutter/Annotations/RouterCenterRestore.mark.dart'
;
import
'package:example_flutter/Annotations/RouterCenterRestore.mark.dart'
;
import
'package:example_flutter/HomeModel/page/picture/PicPage.dart'
;
import
'package:example_flutter/UserModel/service/Resp.dart'
;
import
'package:example_flutter/UserModel/service/Resp.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:example_flutter/commonModel/cache/CacheManager.dart'
;
...
@@ -13,6 +14,8 @@ import 'package:example_flutter/commonModel/toast/toast.dart';
...
@@ -13,6 +14,8 @@ import 'package:example_flutter/commonModel/toast/toast.dart';
import
'package:example_flutter/res/anim/Anim.dart'
;
import
'package:example_flutter/res/anim/Anim.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'../../../HomePage.dart'
;
class
LoginModel
extends
BaseModel
{
class
LoginModel
extends
BaseModel
{
resign
(
BuildContext
context
,
String
text
,
String
text2
)
{
resign
(
BuildContext
context
,
String
text
,
String
text2
)
{
Resp
.
getInstance
().
resign
(
text
,
text2
).
listen
((
value
)
{
Resp
.
getInstance
().
resign
(
text
,
text2
).
listen
((
value
)
{
...
@@ -30,6 +33,8 @@ class LoginModel extends BaseModel {
...
@@ -30,6 +33,8 @@ class LoginModel extends BaseModel {
}
}
login
(
BuildContext
context
,
String
text
,
String
text2
)
async
{
login
(
BuildContext
context
,
String
text
,
String
text2
)
async
{
// CacheManager.getInstance().get(MEMORY_CACHE).save("userName", text);
// Navigator.push(context, CustomRoute(HomePage()));
Resp
.
getInstance
().
login
(
text
,
text2
).
listen
((
value
)
{
Resp
.
getInstance
().
login
(
text
,
text2
).
listen
((
value
)
{
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
if
(
value
!=
null
&&
value
.
token
!=
null
)
{
if
(
value
!=
null
&&
value
.
token
!=
null
)
{
...
@@ -37,9 +42,10 @@ class LoginModel extends BaseModel {
...
@@ -37,9 +42,10 @@ class LoginModel extends BaseModel {
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
"userName"
,
text
);
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
"userName"
,
text
);
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
"userWorld"
,
text2
);
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
"userWorld"
,
text2
);
Toast
.
show
(
context
,
"登入成功"
);
Toast
.
show
(
context
,
"登入成功"
);
Navigator
.
push
(
context
,
CustomRoute
(
// Navigator.push(context, CustomRoute(PicPage()));
RouterCenterImpl
().
findHomeRouter
()?.
getHomePage
()
// Navigator.push(context,
));
// CustomRoute(RouterCenterImpl().findHomeRouter()?.getHomePage()));
Navigator
.
push
(
context
,
CustomRoute
(
HomePage
()));
}
else
{
}
else
{
Toast
.
show
(
context
,
"接口请求错误 ==> login"
);
Toast
.
show
(
context
,
"接口请求错误 ==> login"
);
}
}
...
...
lib/UserModel/page/login/LoginPage.dart
View file @
14bfc57b
...
@@ -53,7 +53,7 @@ class LoginState extends State<LoginPage> {
...
@@ -53,7 +53,7 @@ class LoginState extends State<LoginPage> {
child:
BackdropFilter
(
child:
BackdropFilter
(
filter:
new
ImageFilter
.
blur
(
sigmaX:
100
,
sigmaY:
100
),
filter:
new
ImageFilter
.
blur
(
sigmaX:
100
,
sigmaY:
100
),
child:
Image
.
network
(
child:
Image
.
network
(
"http
s://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573655792197&di=f9469fa087a082aedfd22514c1549e1f&imgtype=0&src=http%3A%2F%2Fimg8.zol.com.cn%2Fbbs%2Fupload%2F19571%2F19570481.jp
g"
,
"http
://b-ssl.duitang.com/uploads/item/201208/30/20120830173930_PBfJE.jpe
g"
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)),
)),
),
),
...
...
lib/UserModel/page/usermanager/Persionset.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-06
**/
import
'package:example_flutter/HomeModel/base/BaseTitle.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseState.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
class
Persionset
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
PersionsetState
();
}
class
PersionsetState
extends
BaseState
<
Persionset
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
MyAppBar
(),
body:
Container
(
alignment:
Alignment
.
center
,
child:
baseText
(
"人员管理页面 待实现"
,
20
,
Colors
.
black
),
),
);
}
}
lib/commonModel/GMBase.dart
View file @
14bfc57b
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
library
GMBase
;
library
GMBase
;
export
'base/BaseComponent.dart'
;
export
'base/BaseComponent.dart'
;
export
'base/BaseUtil.dart'
;
export
'live/BaseModel.dart'
;
export
'live/BaseModel.dart'
;
export
'live/LiveData.dart'
;
export
'live/LiveData.dart'
;
export
'net/Api.dart'
;
export
'net/Api.dart'
;
...
...
lib/commonModel/base/BaseComponent.dart
View file @
14bfc57b
...
@@ -17,6 +17,23 @@ Future getTempDir() {
...
@@ -17,6 +17,23 @@ Future getTempDir() {
return
channel
.
invokeMethod
(
"getTemporaryDirectory"
);
return
channel
.
invokeMethod
(
"getTemporaryDirectory"
);
}
}
Future
<
bool
>
saveString
(
String
key
,
String
value
)
{
return
channel
.
invokeMethod
(
"setString"
,
{
"key"
:
key
,
"value"
:
value
});
}
void
getString
(
BuildContext
context
,
String
key
,
Function
(
String
str
)
fun
)
{
channel
.
invokeMethod
(
"getString"
,{
"key"
:
key
}).
then
((
value
)
{
fun
(
value
);
}).
catchError
((
error
)
{
Toast
.
show
(
context
,
error
.
toString
());
print
(
error
.
toString
());
});
}
Future
<
bool
>
clearSave
()
{
return
channel
.
invokeMethod
(
"clear"
);
}
void
getTempDirX
(
BuildContext
context
,
Function
(
String
dir
)
f
)
{
void
getTempDirX
(
BuildContext
context
,
Function
(
String
dir
)
f
)
{
getTempDir
().
then
((
value
)
{
getTempDir
().
then
((
value
)
{
f
(
value
);
f
(
value
);
...
...
lib/commonModel/base/BaseState.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-05
**/
import
'dart:async'
;
import
'package:example_flutter/commonModel/eventbus/event/LogoutEvent.dart'
;
import
'package:flutter/material.dart'
;
import
'../../main.dart'
;
abstract
class
BaseState
<
T
extends
StatefulWidget
>
extends
State
<
T
>{
StreamSubscription
<
LogoutEvent
>
busEvent
;
@override
void
initState
()
{
busEvent
=
eventBus
.
on
<
LogoutEvent
>().
listen
((
event
)
{
Navigator
.
pop
(
context
);
});
super
.
initState
();
}
@override
void
dispose
()
{
busEvent
.
cancel
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
// TODO: implement build
throw
UnimplementedError
();
}
}
\ No newline at end of file
lib/commonModel/base/BaseUtil.dart
deleted
100644 → 0
View file @
53f3c5e8
/*
* @author lsy
* @date 2019-10-14
**/
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
void
jumpToPage
(
Widget
page
,
BuildContext
context
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
((
context
)
{
return
page
;
})));
}
lib/commonModel/base/SaveKey.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-11-28
**/
const
String
PAGE_SAVE
=
"PAGE_SAVE"
;
\ No newline at end of file
lib/commonModel/eventbus/event/ChangeTabBean.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-05
**/
class
ChangeTabBean
{
int
index
;
ChangeTabBean
(
this
.
index
);
}
\ No newline at end of file
lib/commonModel/eventbus/event/LogoutEvent.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
class
LogoutEvent
{
LogoutEvent
();
}
lib/commonModel/picker/base/BaseCenterPicker.dart
View file @
14bfc57b
...
@@ -44,7 +44,7 @@ class BaseCenterPickerState extends State<BaseCenterPicker> {
...
@@ -44,7 +44,7 @@ class BaseCenterPickerState extends State<BaseCenterPicker> {
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
Container
(
return
Container
(
color:
Colors
.
black
54
,
color:
Colors
.
black
12
,
width:
double
.
maxFinite
,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
Stack
(
child:
Stack
(
...
...
lib/commonModel/picker/base/BaseDrawPicker.dart
0 → 100644
View file @
14bfc57b
/*
* @author lsy
* @date 2019-12-02
**/
import
'package:example_flutter/commonModel/GMBase.dart'
;
import
'package:example_flutter/commonModel/picker/base/BaseCenterPicker.dart'
;
import
'package:example_flutter/commonModel/picker/base/DialogRouter.dart'
;
import
'package:flutter/material.dart'
;
class
BaseDrawPicker
extends
StatefulWidget
{
BaseDrawPickerState
centerState
;
IDrawPicker
picker
;
bool
cancelOutSide
=
true
;
setPicker
(
IDrawPicker
picker
)
{
this
.
picker
=
picker
;
}
sync
()
{
centerState
?.
setState
(()
{});
}
setCancelOutside
(
bool
cancel
)
{
this
.
cancelOutSide
=
cancel
;
}
show
(
BuildContext
context
)
{
Navigator
.
push
(
context
,
DialogRouter
(
this
));
}
dismiss
(
BuildContext
context
)
{
Navigator
.
pop
(
context
);
}
@override
State
<
StatefulWidget
>
createState
()
{
centerState
=
BaseDrawPickerState
();
return
centerState
;
}
}
class
BaseDrawPickerState
extends
State
<
BaseDrawPicker
>
with
SingleTickerProviderStateMixin
{
Animation
<
Offset
>
animation
;
LiveData
<
int
>
liveData
=
new
LiveData
();
AnimationController
controller
;
@override
void
initState
()
{
super
.
initState
();
controller
=
new
AnimationController
(
duration:
const
Duration
(
milliseconds:
300
),
vsync:
this
);
animation
=
new
Tween
(
begin:
Offset
(-
1
,
0
),
end:
Offset
(
0
,
0
)).
animate
(
controller
)
..
addListener
(()
{
double
dy
=
1
-
animation
.
value
.
dx
.
abs
();
if
(
dy
<
0.2
)
{
liveData
.
notifyView
(
null
);
return
;
}
String
alp
=
"
${(dy.abs() * (99)).toInt()}
"
;
if
(
alp
.
length
==
1
)
{
alp
=
"0
$alp
"
;
}
String
colorString
=
"0x
${alp}
000000"
;
print
(
colorString
);
liveData
.
notifyView
(
int
.
parse
(
colorString
));
});
controller
.
forward
();
}
@override
void
dispose
()
{
widget
.
picker
.
dispose
();
liveData
.
dispost
();
controller
.
dispose
();
super
.
dispose
();
}
dis
()
{
controller
.
reverse
()
..
whenComplete
(()
{
Navigator
.
pop
(
context
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
// ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
return
Container
(
// color: Colors.black54,
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
child:
Stack
(
alignment:
Alignment
.
topLeft
,
children:
<
Widget
>[
GestureDetector
(
onTap:
()
{
if
(
widget
.
cancelOutSide
)
{
dis
();
// widget.dismiss(context);
}
},
child:
StreamBuilder
(
stream:
liveData
.
stream
,
builder:
(
con
,
data
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
}
return
Container
(
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
color:
Color
(
data
.
data
),
);
},
)),
SlideTransition
(
position:
animation
,
child:
Container
(
child:
Material
(
color:
Colors
.
transparent
,
child:
widget
.
picker
.
build
(
context
,
()
{
dis
();
}),
)))
],
),
);
}
}
abstract
class
IDrawPicker
{
Widget
build
(
BuildContext
context
,
VoidCallback
dismiss
);
dispose
();
}
lib/main.dart
View file @
14bfc57b
...
@@ -12,8 +12,12 @@
...
@@ -12,8 +12,12 @@
// See the License for the specific language governing permissions and
// See the License for the specific language governing permissions and
// limitations under the License.
// limitations under the License.
import
'package:event_bus/event_bus.dart'
;
import
'package:example_flutter/Annotations/RouterCenterRestore.mark.dart'
;
import
'package:example_flutter/Annotations/RouterCenterRestore.mark.dart'
;
import
'package:example_flutter/HomeModel/page/data/DataCenter.dart'
;
import
'package:example_flutter/HomeModel/page/home/HomePage.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:example_flutter/res/anim/Anim.dart'
;
import
'package:flutter/foundation.dart'
import
'package:flutter/foundation.dart'
show
debugDefaultTargetPlatformOverride
;
show
debugDefaultTargetPlatformOverride
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -21,6 +25,9 @@ import 'package:flutter/services.dart';
...
@@ -21,6 +25,9 @@ import 'package:flutter/services.dart';
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:file_chooser/file_chooser.dart'
;
import
'package:file_chooser/file_chooser.dart'
;
import
'commonModel/base/SaveKey.dart'
;
EventBus
eventBus
=
EventBus
();
void
main
(
)
{
void
main
(
)
{
// See https://github.com/flutter/flutter/wiki/Desktop-shells#target-platform-override
// See https://github.com/flutter/flutter/wiki/Desktop-shells#target-platform-override
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
fuchsia
;
debugDefaultTargetPlatformOverride
=
TargetPlatform
.
fuchsia
;
...
@@ -32,7 +39,6 @@ class MyApp extends StatelessWidget {
...
@@ -32,7 +39,6 @@ class MyApp extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
return
MaterialApp
(
showSemanticsDebugger:
false
,
title:
'Flutter Demo'
,
title:
'Flutter Demo'
,
theme:
ThemeData
(
theme:
ThemeData
(
primarySwatch:
Colors
.
blue
,
primarySwatch:
Colors
.
blue
,
...
...
macos/Runner.xcodeproj/project.pbxproj
View file @
14bfc57b
...
@@ -28,55 +28,6 @@
...
@@ -28,55 +28,6 @@
183FB04A238D11090011D0AB
/* QuartzCore.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB049238D11090011D0AB
/* QuartzCore.framework */
;
};
183FB04A238D11090011D0AB
/* QuartzCore.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB049238D11090011D0AB
/* QuartzCore.framework */
;
};
183FB04C238D11100011D0AB
/* Accelerate.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB04B238D11100011D0AB
/* Accelerate.framework */
;
};
183FB04C238D11100011D0AB
/* Accelerate.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB04B238D11100011D0AB
/* Accelerate.framework */
;
};
183FB04E238D207E0011D0AB
/* Cv.mm in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB04D238D207E0011D0AB
/* Cv.mm */
;
};
183FB04E238D207E0011D0AB
/* Cv.mm in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
183FB04D238D207E0011D0AB
/* Cv.mm */
;
};
18C61B4F238E1E470098E1C1
/* libopencv_aruco.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B33238E1E300098E1C1
/* libopencv_aruco.4.1.2.dylib */
;
};
18C61B50238E1E550098E1C1
/* libopencv_bgsegm.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B45238E1E310098E1C1
/* libopencv_bgsegm.4.1.2.dylib */
;
};
18C61B51238E1E820098E1C1
/* libopencv_calib3d.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B46238E1E310098E1C1
/* libopencv_calib3d.4.1.2.dylib */
;
};
18C61B52238E1E820098E1C1
/* libopencv_bioinspired.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B14238E1E2F0098E1C1
/* libopencv_bioinspired.4.1.2.dylib */
;
};
18C61B53238E1E820098E1C1
/* libopencv_ccalib.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AF2238E1E2E0098E1C1
/* libopencv_ccalib.4.1.2.dylib */
;
};
18C61B54238E1E820098E1C1
/* libopencv_core.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B1E238E1E2F0098E1C1
/* libopencv_core.4.1.2.dylib */
;
};
18C61B55238E1E820098E1C1
/* libopencv_datasets.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AE9238E1E2E0098E1C1
/* libopencv_datasets.4.1.2.dylib */
;
};
18C61B56238E1E820098E1C1
/* libopencv_dnn_objdetect.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B4E238E1E310098E1C1
/* libopencv_dnn_objdetect.4.1.2.dylib */
;
};
18C61B57238E1E820098E1C1
/* libopencv_dnn_superres.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B2F238E1E300098E1C1
/* libopencv_dnn_superres.4.1.2.dylib */
;
};
18C61B58238E1E820098E1C1
/* libopencv_dnn.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B04238E1E2E0098E1C1
/* libopencv_dnn.4.1.2.dylib */
;
};
18C61B59238E1E820098E1C1
/* libopencv_dpm.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B15238E1E2F0098E1C1
/* libopencv_dpm.4.1.2.dylib */
;
};
18C61B5A238E1E820098E1C1
/* libopencv_face.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B3E238E1E300098E1C1
/* libopencv_face.4.1.2.dylib */
;
};
18C61B5B238E1E820098E1C1
/* libopencv_features2d.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B2E238E1E300098E1C1
/* libopencv_features2d.4.1.2.dylib */
;
};
18C61B5C238E1E820098E1C1
/* libopencv_flann.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B07238E1E2E0098E1C1
/* libopencv_flann.4.1.2.dylib */
;
};
18C61B5D238E1E820098E1C1
/* libopencv_freetype.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61ACD238E1E2D0098E1C1
/* libopencv_freetype.4.1.2.dylib */
;
};
18C61B5E238E1E820098E1C1
/* libopencv_fuzzy.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B03238E1E2E0098E1C1
/* libopencv_fuzzy.4.1.2.dylib */
;
};
18C61B5F238E1E820098E1C1
/* libopencv_hfs.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B2B238E1E2F0098E1C1
/* libopencv_hfs.4.1.2.dylib */
;
};
18C61B60238E1E820098E1C1
/* libopencv_gapi.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B13238E1E2F0098E1C1
/* libopencv_gapi.4.1.2.dylib */
;
};
18C61B61238E1E820098E1C1
/* libopencv_highgui.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B23238E1E2F0098E1C1
/* libopencv_highgui.4.1.2.dylib */
;
};
18C61B62238E1E820098E1C1
/* libopencv_img_hash.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B3F238E1E300098E1C1
/* libopencv_img_hash.4.1.2.dylib */
;
};
18C61B63238E1EDB0098E1C1
/* libopencv_xphoto.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AEA238E1E2E0098E1C1
/* libopencv_xphoto.4.1.2.dylib */
;
};
18C61B64238E1EDB0098E1C1
/* libopencv_ximgproc.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B35238E1E300098E1C1
/* libopencv_ximgproc.4.1.2.dylib */
;
};
18C61B65238E1EDB0098E1C1
/* libopencv_xobjdetect.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B1A238E1E2F0098E1C1
/* libopencv_xobjdetect.4.1.2.dylib */
;
};
18C61B66238E1EDB0098E1C1
/* libopencv_xfeatures2d.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AEE238E1E2E0098E1C1
/* libopencv_xfeatures2d.4.1.2.dylib */
;
};
18C61B67238E1EDB0098E1C1
/* libopencv_videostab.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B12238E1E2F0098E1C1
/* libopencv_videostab.4.1.2.dylib */
;
};
18C61B68238E1EDB0098E1C1
/* libopencv_videoio.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B34238E1E300098E1C1
/* libopencv_videoio.4.1.2.dylib */
;
};
18C61B69238E1EDB0098E1C1
/* libopencv_tracking.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AD9238E1E2D0098E1C1
/* libopencv_tracking.4.1.2.dylib */
;
};
18C61B6A238E1EDB0098E1C1
/* libopencv_video.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AF3238E1E2E0098E1C1
/* libopencv_video.4.1.2.dylib */
;
};
18C61B6B238E1EDB0098E1C1
/* libopencv_text.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AFE238E1E2E0098E1C1
/* libopencv_text.4.1.2.dylib */
;
};
18C61B6C238E1EDB0098E1C1
/* libopencv_surface_matching.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B48238E1E310098E1C1
/* libopencv_surface_matching.4.1.2.dylib */
;
};
18C61B6D238E1EDB0098E1C1
/* libopencv_superres.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B21238E1E2F0098E1C1
/* libopencv_superres.4.1.2.dylib */
;
};
18C61B6E238E1EDB0098E1C1
/* libopencv_structured_light.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B1F238E1E2F0098E1C1
/* libopencv_structured_light.4.1.2.dylib */
;
};
18C61B6F238E1EDB0098E1C1
/* libopencv_stitching.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B2D238E1E300098E1C1
/* libopencv_stitching.4.1.2.dylib */
;
};
18C61B70238E1EDB0098E1C1
/* libopencv_stereo.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B43238E1E310098E1C1
/* libopencv_stereo.4.1.2.dylib */
;
};
18C61B71238E1EDB0098E1C1
/* libopencv_shape.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61ADA238E1E2D0098E1C1
/* libopencv_shape.4.1.2.dylib */
;
};
18C61B72238E1EDB0098E1C1
/* libopencv_sfm.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B1C238E1E2F0098E1C1
/* libopencv_sfm.4.1.2.dylib */
;
};
18C61B73238E1EDB0098E1C1
/* libopencv_rgbd.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B2C238E1E300098E1C1
/* libopencv_rgbd.4.1.2.dylib */
;
};
18C61B74238E1EDB0098E1C1
/* libopencv_saliency.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AEC238E1E2E0098E1C1
/* libopencv_saliency.4.1.2.dylib */
;
};
18C61B75238E1EDB0098E1C1
/* libopencv_reg.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AD7238E1E2D0098E1C1
/* libopencv_reg.4.1.2.dylib */
;
};
18C61B76238E1EDB0098E1C1
/* libopencv_quality.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AFF238E1E2E0098E1C1
/* libopencv_quality.4.1.2.dylib */
;
};
18C61B77238E1EDB0098E1C1
/* libopencv_plot.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61ADE238E1E2E0098E1C1
/* libopencv_plot.4.1.2.dylib */
;
};
18C61B78238E1EDB0098E1C1
/* libopencv_photo.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AD5238E1E2D0098E1C1
/* libopencv_photo.4.1.2.dylib */
;
};
18C61B79238E1EDB0098E1C1
/* libopencv_phase_unwrapping.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61AF0238E1E2E0098E1C1
/* libopencv_phase_unwrapping.4.1.2.dylib */
;
};
18C61B7A238E1EDB0098E1C1
/* libopencv_optflow.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B42238E1E310098E1C1
/* libopencv_optflow.4.1.2.dylib */
;
};
18C61B7B238E1EDB0098E1C1
/* libopencv_objdetect.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B3D238E1E300098E1C1
/* libopencv_objdetect.4.1.2.dylib */
;
};
18C61B7C238E1EDB0098E1C1
/* libopencv_ml.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61ACC238E1E2D0098E1C1
/* libopencv_ml.4.1.2.dylib */
;
};
18C61B7D238E1EDB0098E1C1
/* libopencv_line_descriptor.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B1B238E1E2F0098E1C1
/* libopencv_line_descriptor.4.1.2.dylib */
;
};
18C61B7E238E1EDB0098E1C1
/* libopencv_imgproc.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B02238E1E2E0098E1C1
/* libopencv_imgproc.4.1.2.dylib */
;
};
18C61B7F238E1EDB0098E1C1
/* libopencv_imgcodecs.4.1.2.dylib in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
18C61B32238E1E300098E1C1
/* libopencv_imgcodecs.4.1.2.dylib */
;
};
335BBD1B22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
335BBD1A22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift */
;
};
335BBD1B22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
335BBD1A22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift */
;
};
33CC10F12044A3C60003C045
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
33CC10F02044A3C60003C045
/* AppDelegate.swift */
;
};
33CC10F12044A3C60003C045
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
33CC10F02044A3C60003C045
/* AppDelegate.swift */
;
};
33CC10F32044A3C60003C045
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
33CC10F22044A3C60003C045
/* Assets.xcassets */
;
};
33CC10F32044A3C60003C045
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
33CC10F22044A3C60003C045
/* Assets.xcassets */
;
};
...
@@ -252,7 +203,7 @@
...
@@ -252,7 +203,7 @@
18C61B4E238E1E310098E1C1
/* libopencv_dnn_objdetect.4.1.2.dylib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"compiled.mach-o.dylib"
;
name
=
libopencv_dnn_objdetect.4.1.2.dylib
;
path
=
../../../aar/opencv/libopencv_dnn_objdetect.4.1.2.dylib
;
sourceTree
=
"<group>"
;
};
18C61B4E238E1E310098E1C1
/* libopencv_dnn_objdetect.4.1.2.dylib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"compiled.mach-o.dylib"
;
name
=
libopencv_dnn_objdetect.4.1.2.dylib
;
path
=
../../../aar/opencv/libopencv_dnn_objdetect.4.1.2.dylib
;
sourceTree
=
"<group>"
;
};
333000ED22D3DE5D00554162
/* Warnings.xcconfig */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xcconfig
;
path
=
Warnings.xcconfig
;
sourceTree
=
"<group>"
;
};
333000ED22D3DE5D00554162
/* Warnings.xcconfig */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xcconfig
;
path
=
Warnings.xcconfig
;
sourceTree
=
"<group>"
;
};
335BBD1A22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GeneratedPluginRegistrant.swift
;
sourceTree
=
"<group>"
;
};
335BBD1A22A9A15E00E9071D
/* GeneratedPluginRegistrant.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GeneratedPluginRegistrant.swift
;
sourceTree
=
"<group>"
;
};
33CC10ED2044A3C60003C045
/*
Flutter Desktop Example.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
"Flutter Desktop Example
.app"
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
33CC10ED2044A3C60003C045
/*
更美AI标注平台.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
"更美AI标注平台
.app"
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
33CC10F02044A3C60003C045
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
33CC10F02044A3C60003C045
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
33CC10F22044A3C60003C045
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
name
=
Assets.xcassets
;
path
=
Runner/Assets.xcassets
;
sourceTree
=
"<group>"
;
};
33CC10F22044A3C60003C045
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
name
=
Assets.xcassets
;
path
=
Runner/Assets.xcassets
;
sourceTree
=
"<group>"
;
};
33CC10F52044A3C60003C045
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
name
=
Base
;
path
=
Base.lproj/MainMenu.xib
;
sourceTree
=
"<group>"
;
};
33CC10F52044A3C60003C045
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
name
=
Base
;
path
=
Base.lproj/MainMenu.xib
;
sourceTree
=
"<group>"
;
};
...
@@ -279,55 +230,6 @@
...
@@ -279,55 +230,6 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
18C61B63238E1EDB0098E1C1
/* libopencv_xphoto.4.1.2.dylib in Frameworks */
,
18C61B64238E1EDB0098E1C1
/* libopencv_ximgproc.4.1.2.dylib in Frameworks */
,
18C61B65238E1EDB0098E1C1
/* libopencv_xobjdetect.4.1.2.dylib in Frameworks */
,
18C61B66238E1EDB0098E1C1
/* libopencv_xfeatures2d.4.1.2.dylib in Frameworks */
,
18C61B67238E1EDB0098E1C1
/* libopencv_videostab.4.1.2.dylib in Frameworks */
,
18C61B68238E1EDB0098E1C1
/* libopencv_videoio.4.1.2.dylib in Frameworks */
,
18C61B69238E1EDB0098E1C1
/* libopencv_tracking.4.1.2.dylib in Frameworks */
,
18C61B6A238E1EDB0098E1C1
/* libopencv_video.4.1.2.dylib in Frameworks */
,
18C61B6B238E1EDB0098E1C1
/* libopencv_text.4.1.2.dylib in Frameworks */
,
18C61B6C238E1EDB0098E1C1
/* libopencv_surface_matching.4.1.2.dylib in Frameworks */
,
18C61B6D238E1EDB0098E1C1
/* libopencv_superres.4.1.2.dylib in Frameworks */
,
18C61B6E238E1EDB0098E1C1
/* libopencv_structured_light.4.1.2.dylib in Frameworks */
,
18C61B6F238E1EDB0098E1C1
/* libopencv_stitching.4.1.2.dylib in Frameworks */
,
18C61B70238E1EDB0098E1C1
/* libopencv_stereo.4.1.2.dylib in Frameworks */
,
18C61B71238E1EDB0098E1C1
/* libopencv_shape.4.1.2.dylib in Frameworks */
,
18C61B72238E1EDB0098E1C1
/* libopencv_sfm.4.1.2.dylib in Frameworks */
,
18C61B73238E1EDB0098E1C1
/* libopencv_rgbd.4.1.2.dylib in Frameworks */
,
18C61B74238E1EDB0098E1C1
/* libopencv_saliency.4.1.2.dylib in Frameworks */
,
18C61B75238E1EDB0098E1C1
/* libopencv_reg.4.1.2.dylib in Frameworks */
,
18C61B76238E1EDB0098E1C1
/* libopencv_quality.4.1.2.dylib in Frameworks */
,
18C61B77238E1EDB0098E1C1
/* libopencv_plot.4.1.2.dylib in Frameworks */
,
18C61B78238E1EDB0098E1C1
/* libopencv_photo.4.1.2.dylib in Frameworks */
,
18C61B79238E1EDB0098E1C1
/* libopencv_phase_unwrapping.4.1.2.dylib in Frameworks */
,
18C61B7A238E1EDB0098E1C1
/* libopencv_optflow.4.1.2.dylib in Frameworks */
,
18C61B7B238E1EDB0098E1C1
/* libopencv_objdetect.4.1.2.dylib in Frameworks */
,
18C61B7C238E1EDB0098E1C1
/* libopencv_ml.4.1.2.dylib in Frameworks */
,
18C61B7D238E1EDB0098E1C1
/* libopencv_line_descriptor.4.1.2.dylib in Frameworks */
,
18C61B7E238E1EDB0098E1C1
/* libopencv_imgproc.4.1.2.dylib in Frameworks */
,
18C61B7F238E1EDB0098E1C1
/* libopencv_imgcodecs.4.1.2.dylib in Frameworks */
,
18C61B62238E1E820098E1C1
/* libopencv_img_hash.4.1.2.dylib in Frameworks */
,
18C61B61238E1E820098E1C1
/* libopencv_highgui.4.1.2.dylib in Frameworks */
,
18C61B5F238E1E820098E1C1
/* libopencv_hfs.4.1.2.dylib in Frameworks */
,
18C61B60238E1E820098E1C1
/* libopencv_gapi.4.1.2.dylib in Frameworks */
,
18C61B5E238E1E820098E1C1
/* libopencv_fuzzy.4.1.2.dylib in Frameworks */
,
18C61B5D238E1E820098E1C1
/* libopencv_freetype.4.1.2.dylib in Frameworks */
,
18C61B5C238E1E820098E1C1
/* libopencv_flann.4.1.2.dylib in Frameworks */
,
18C61B5B238E1E820098E1C1
/* libopencv_features2d.4.1.2.dylib in Frameworks */
,
18C61B5A238E1E820098E1C1
/* libopencv_face.4.1.2.dylib in Frameworks */
,
18C61B59238E1E820098E1C1
/* libopencv_dpm.4.1.2.dylib in Frameworks */
,
18C61B58238E1E820098E1C1
/* libopencv_dnn.4.1.2.dylib in Frameworks */
,
18C61B57238E1E820098E1C1
/* libopencv_dnn_superres.4.1.2.dylib in Frameworks */
,
18C61B56238E1E820098E1C1
/* libopencv_dnn_objdetect.4.1.2.dylib in Frameworks */
,
18C61B55238E1E820098E1C1
/* libopencv_datasets.4.1.2.dylib in Frameworks */
,
18C61B54238E1E820098E1C1
/* libopencv_core.4.1.2.dylib in Frameworks */
,
18C61B53238E1E820098E1C1
/* libopencv_ccalib.4.1.2.dylib in Frameworks */
,
18C61B51238E1E820098E1C1
/* libopencv_calib3d.4.1.2.dylib in Frameworks */
,
18C61B52238E1E820098E1C1
/* libopencv_bioinspired.4.1.2.dylib in Frameworks */
,
18C61B50238E1E550098E1C1
/* libopencv_bgsegm.4.1.2.dylib in Frameworks */
,
18C61B4F238E1E470098E1C1
/* libopencv_aruco.4.1.2.dylib in Frameworks */
,
183FB04C238D11100011D0AB
/* Accelerate.framework in Frameworks */
,
183FB04C238D11100011D0AB
/* Accelerate.framework in Frameworks */
,
183FB04A238D11090011D0AB
/* QuartzCore.framework in Frameworks */
,
183FB04A238D11090011D0AB
/* QuartzCore.framework in Frameworks */
,
183FB048238D11020011D0AB
/* CoreGraphics.framework in Frameworks */
,
183FB048238D11020011D0AB
/* CoreGraphics.framework in Frameworks */
,
...
@@ -454,7 +356,7 @@
...
@@ -454,7 +356,7 @@
33CC10EE2044A3C60003C045
/* Products */
=
{
33CC10EE2044A3C60003C045
/* Products */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
33CC10ED2044A3C60003C045
/*
Flutter Desktop Example
.app */
,
33CC10ED2044A3C60003C045
/*
更美AI标注平台
.app */
,
);
);
name
=
Products
;
name
=
Products
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -660,7 +562,7 @@
...
@@ -660,7 +562,7 @@
);
);
name
=
Runner
;
name
=
Runner
;
productName
=
Runner
;
productName
=
Runner
;
productReference
=
33CC10ED2044A3C60003C045
/*
Flutter Desktop Example
.app */
;
productReference
=
33CC10ED2044A3C60003C045
/*
更美AI标注平台
.app */
;
productType
=
"com.apple.product-type.application"
;
productType
=
"com.apple.product-type.application"
;
};
};
/* End PBXNativeTarget section */
/* End PBXNativeTarget section */
...
@@ -899,14 +801,13 @@
...
@@ -899,14 +801,13 @@
"$(inherited)"
,
"$(inherited)"
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
/usr/local/Cellar/opencv/4.1.2/include/opencv4
,
);
);
INFOPLIST_FILE
=
Runner/Info.plist
;
INFOPLIST_FILE
=
Runner/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
(
LD_RUNPATH_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
"@executable_path/../Frameworks"
,
"@executable_path/../Frameworks"
,
);
);
LIBRARY_SEARCH_PATHS
=
/usr/local/Cellar/opencv/4.1.2/lib
;
LIBRARY_SEARCH_PATHS
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_VERSION
=
4.0
;
SWIFT_VERSION
=
4.0
;
...
@@ -1040,14 +941,13 @@
...
@@ -1040,14 +941,13 @@
"$(inherited)"
,
"$(inherited)"
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
/usr/local/Cellar/opencv/4.1.2/include/opencv4
,
);
);
INFOPLIST_FILE
=
Runner/Info.plist
;
INFOPLIST_FILE
=
Runner/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
(
LD_RUNPATH_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
"@executable_path/../Frameworks"
,
"@executable_path/../Frameworks"
,
);
);
LIBRARY_SEARCH_PATHS
=
/usr/local/Cellar/opencv/4.1.2/lib
;
LIBRARY_SEARCH_PATHS
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
...
@@ -1075,14 +975,13 @@
...
@@ -1075,14 +975,13 @@
"$(inherited)"
,
"$(inherited)"
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/file_chooser/file_chooser.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
"\"${PODS_CONFIGURATION_BUILD_DIR}/path_provider_fde/path_provider_fde.framework/Headers\""
,
/usr/local/Cellar/opencv/4.1.2/include/opencv4
,
);
);
INFOPLIST_FILE
=
Runner/Info.plist
;
INFOPLIST_FILE
=
Runner/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
(
LD_RUNPATH_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
"@executable_path/../Frameworks"
,
"@executable_path/../Frameworks"
,
);
);
LIBRARY_SEARCH_PATHS
=
/usr/local/Cellar/opencv/4.1.2/lib
;
LIBRARY_SEARCH_PATHS
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_VERSION
=
4.0
;
SWIFT_VERSION
=
4.0
;
...
...
macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
View file @
14bfc57b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"
Flutter Desktop Example
.app"
BuildableName =
"
更美AI标注平台
.app"
BlueprintName =
"Runner"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableReference>
...
@@ -27,6 +27,15 @@
...
@@ -27,6 +27,15 @@
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"更美AI标注平台.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<Testables>
<Testables>
<TestableReference
<TestableReference
skipped =
"NO"
>
skipped =
"NO"
>
...
@@ -39,17 +48,6 @@
...
@@ -39,17 +48,6 @@
</BuildableReference>
</BuildableReference>
</TestableReference>
</TestableReference>
</Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"Flutter Desktop Example.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
</TestAction>
<LaunchAction
<LaunchAction
buildConfiguration =
"Debug"
buildConfiguration =
"Debug"
...
@@ -66,13 +64,11 @@
...
@@ -66,13 +64,11 @@
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"
Flutter Desktop Example
.app"
BuildableName =
"
更美AI标注平台
.app"
BlueprintName =
"Runner"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableReference>
</BuildableProductRunnable>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
</LaunchAction>
<ProfileAction
<ProfileAction
buildConfiguration =
"Release"
buildConfiguration =
"Release"
...
@@ -85,7 +81,7 @@
...
@@ -85,7 +81,7 @@
<BuildableReference
<BuildableReference
BuildableIdentifier =
"primary"
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"
Flutter Desktop Example
.app"
BuildableName =
"
更美AI标注平台
.app"
BlueprintName =
"Runner"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableReference>
...
...
macos/Runner/Configs/AppInfo.xcconfig
View file @
14bfc57b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
// 'flutter create' template.
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME =
Flutter Desktop Example
PRODUCT_NAME =
更美AI标注平台
// The application's bundle identifier
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterDesktopExample
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterDesktopExample
...
...
pubspec.yaml
View file @
14bfc57b
...
@@ -19,7 +19,8 @@ dependencies:
...
@@ -19,7 +19,8 @@ dependencies:
dio
:
^2.2.2
dio
:
^2.2.2
rxdart
:
^0.22.0
#链式编程
rxdart
:
^0.22.0
#链式编程
flutter_svg
:
^0.14.1
flutter_svg
:
^0.14.1
pull_to_refresh
:
^1.5.0
liquid_progress_indicator
:
^0.3.2
file_chooser
:
file_chooser
:
git
:
git
:
url
:
https://github.com/hpoul/flutter-desktop-embedding.git
url
:
https://github.com/hpoul/flutter-desktop-embedding.git
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment