Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_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
林生雨
gm_flutter
Commits
3350f491
Commit
3350f491
authored
Jul 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
20974fde
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
110 deletions
+21
-110
PlanBar.dart
lib/ClueModel/page/plan/PlanBar.dart
+1
-1
PlanModel.dart
lib/ClueModel/page/plan/PlanModel.dart
+11
-3
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+4
-4
ProjectView.dart
lib/ClueModel/page/plan/ProjectView.dart
+3
-2
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+2
-1
TP.dart
lib/MainRouter/page/test/TP.dart
+0
-98
TestPage.dart
lib/MainRouter/page/test/TestPage.dart
+0
-1
No files found.
lib/ClueModel/page/plan/PlanBar.dart
View file @
3350f491
...
@@ -12,7 +12,7 @@ class PlanBarView extends StatelessWidget {
...
@@ -12,7 +12,7 @@ class PlanBarView extends StatelessWidget {
final
Function
(
int
showIndex
)
managerListener
;
final
Function
(
int
showIndex
)
managerListener
;
final
ChangeNotifier
notifier
;
final
ChangeNotifier
notifier
;
int
showIndex
=
-
1
;
int
showIndex
=
-
1
;
List
normalData
=
[
"全部项目"
,
"智能
排序
"
,
"筛选"
];
List
normalData
=
[
"全部项目"
,
"智能
筛选
"
,
"筛选"
];
PlanBarView
(
this
.
managerLive
,
this
.
managerListener
,
this
.
notifier
)
{
PlanBarView
(
this
.
managerLive
,
this
.
managerListener
,
this
.
notifier
)
{
if
(!
notifier
?.
hasListeners
)
{
if
(!
notifier
?.
hasListeners
)
{
...
...
lib/ClueModel/page/plan/PlanModel.dart
View file @
3350f491
...
@@ -41,6 +41,8 @@ class PlanModel extends BaseModel {
...
@@ -41,6 +41,8 @@ class PlanModel extends BaseModel {
String
max_price
=
""
;
String
max_price
=
""
;
String
rank_type
=
""
;
String
rank_type
=
""
;
List
<
String
>
normalData
=
[
"全部项目"
,
"智能筛选"
,
"筛选"
];
int
page
=
1
;
int
page
=
1
;
int
sortPos
=
0
;
int
sortPos
=
0
;
...
@@ -53,6 +55,8 @@ class PlanModel extends BaseModel {
...
@@ -53,6 +55,8 @@ class PlanModel extends BaseModel {
sortList
=
event
.
data
.
orders
;
sortList
=
event
.
data
.
orders
;
picLive
.
notifyView
(
event
.
data
.
ranks
);
picLive
.
notifyView
(
event
.
data
.
ranks
);
stateLive
.
notifyView
(
ENDLOADING
);
stateLive
.
notifyView
(
ENDLOADING
);
normalData
[
1
]
=
event
.
data
.
orders
[
0
].
name
;
managerLive
.
notifyView
(
normalData
);
if
(
call
!=
null
)
{
if
(
call
!=
null
)
{
call
();
call
();
}
}
...
@@ -70,10 +74,12 @@ class PlanModel extends BaseModel {
...
@@ -70,10 +74,12 @@ class PlanModel extends BaseModel {
});
});
}
}
void
projectClick
(
String
id
)
{
void
projectClick
(
String
id
,
String
name
)
{
if
(
tag_id
==
id
)
{
if
(
tag_id
==
id
)
{
return
;
return
;
}
}
normalData
[
0
]
=
name
;
managerLive
.
notifyView
(
normalData
);
tag_id
=
id
;
tag_id
=
id
;
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
refreshFeed
(
true
);
refreshFeed
(
true
);
...
@@ -90,9 +96,9 @@ class PlanModel extends BaseModel {
...
@@ -90,9 +96,9 @@ class PlanModel extends BaseModel {
.
listen
((
event
)
{
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
if
(
page
==
1
)
{
if
(
page
==
1
)
{
feedsLive
.
notifyView
(
Pair
(
EMPTY
,
[]));
feedsLive
.
notifyView
(
Pair
(
EMPTY
,
[]));
}
else
{
}
else
{
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
}
}
}
else
{
}
else
{
...
@@ -143,6 +149,8 @@ class PlanModel extends BaseModel {
...
@@ -143,6 +149,8 @@ class PlanModel extends BaseModel {
}
}
sortPos
=
index
;
sortPos
=
index
;
order_by
=
sortList
[
index
].
id
.
toString
();
order_by
=
sortList
[
index
].
id
.
toString
();
normalData
[
1
]=
"
${sortList[index].name}
"
;
managerLive
.
notifyView
(
normalData
);
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
refreshFeed
(
true
);
refreshFeed
(
true
);
}
}
...
...
lib/ClueModel/page/plan/PlanPage.dart
View file @
3350f491
...
@@ -107,12 +107,12 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -107,12 +107,12 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
return
Container
(
return
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
//主页 剪去tabbar高度
//主页 剪去tabbar高度
height:
MediaQuery
.
of
(
context
).
size
.
height
-
79
,
height:
MediaQuery
.
of
(
context
).
size
.
height
-
50
,
child:
Stack
(
child:
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
MediaQuery
.
of
(
context
).
size
.
height
-
79
,
height:
MediaQuery
.
of
(
context
).
size
.
height
-
50
,
// child: child(),
// child: child(),
child:
homeWarp
(),
child:
homeWarp
(),
),
),
...
@@ -181,9 +181,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -181,9 +181,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
maxHeight:
450
,
maxHeight:
450
,
listener:
projectMenuListener
,
listener:
projectMenuListener
,
child:
ProjectView
(
_model
.
projectData
,
(
id
)
{
child:
ProjectView
(
_model
.
projectData
,
(
id
,
name
)
{
clickIndexOther
(
0
);
clickIndexOther
(
0
);
_model
.
projectClick
(
id
);
_model
.
projectClick
(
id
,
name
);
}),
}),
proListener:
(
pro
)
{
proListener:
(
pro
)
{
_model
.
backProgress
(
pro
,
0
);
_model
.
backProgress
(
pro
,
0
);
...
...
lib/ClueModel/page/plan/ProjectView.dart
View file @
3350f491
...
@@ -11,7 +11,7 @@ import 'package:gm_flutter/commonModel/util/DartUtil.dart';
...
@@ -11,7 +11,7 @@ import 'package:gm_flutter/commonModel/util/DartUtil.dart';
class
ProjectView
extends
StatefulWidget
{
class
ProjectView
extends
StatefulWidget
{
final
List
<
Tags
>
datas
;
final
List
<
Tags
>
datas
;
final
Function
(
String
id
)
clickCall
;
final
Function
(
String
id
,
String
name
)
clickCall
;
ProjectView
(
this
.
datas
,
this
.
clickCall
);
ProjectView
(
this
.
datas
,
this
.
clickCall
);
...
@@ -82,7 +82,8 @@ class ProjectViewState extends State<ProjectView> {
...
@@ -82,7 +82,8 @@ class ProjectViewState extends State<ProjectView> {
child:
baseText
(
widget
.
datas
[
selectIndex
].
subtags
[
index
].
name
,
child:
baseText
(
widget
.
datas
[
selectIndex
].
subtags
[
index
].
name
,
14
,
Color
(
0xff464646
)),
14
,
Color
(
0xff464646
)),
).
gestureDetector
(()
{
).
gestureDetector
(()
{
widget
.
clickCall
(
"
${widget.datas[selectIndex].subtags[index].tagId}
"
);
widget
.
clickCall
(
"
${widget.datas[selectIndex].subtags[index].tagId}
"
,
"
${widget.datas[selectIndex].subtags[index].name}
"
);
});
});
},
},
itemCount:
widget
.
datas
[
selectIndex
].
subtags
.
length
,
itemCount:
widget
.
datas
[
selectIndex
].
subtags
.
length
,
...
...
lib/ClueModel/page/top/TopPage.dart
View file @
3350f491
...
@@ -161,7 +161,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -161,7 +161,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
SliverOverlapAbsorber
(
SliverOverlapAbsorber
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
context
),
context
),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
)),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
,
height:
175
)),
SliverPersistentHeader
(
SliverPersistentHeader
(
pinned:
true
,
pinned:
true
,
delegate:
StickyTabBarDelegate
(
delegate:
StickyTabBarDelegate
(
...
...
lib/MainRouter/page/test/TP.dart
deleted
100644 → 0
View file @
20974fde
/*
* @author lsy
* @date 2020/5/14
**/
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/util/WidgetUtil.dart'
;
class
TP
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
TPState
();
}
class
TPState
extends
BaseState
<
TP
>
{
final
key
=
GlobalKey
<
State
>();
@override
Widget
buildItem
(
BuildContext
context
)
{
// if(context!=null){
// throw RecorderRunningException("?????");
// }throw
return
Scaffold
(
appBar:
AppBar
(
actions:
<
Widget
>[
GestureDetector
(
onTap:
()
async
{
},
child:
Container
(
width:
60
,
height:
56
,
color:
Colors
.
red
,
),
)
],
),
body:
Container
(
width:
double
.
maxFinite
,
height:
double
.
maxFinite
,
alignment:
Alignment
.
center
,
child:
InkWell
(
onTap:
()
async
{
RenderBox
box
=
key
.
currentContext
.
findRenderObject
();
Offset
offset
=
box
.
localToGlobal
(
Offset
.
zero
);
final
result
=
await
showMenu
(
context:
context
,
position:
WidgetUtil
.
buttonMenuPosition
(
key
.
currentContext
),
items:
<
PopupMenuItem
<
String
>>[
new
PopupMenuItem
<
String
>(
value:
'value01'
,
child:
Container
(
height:
5
,
width:
5
,
color:
Colors
.
blue
,
)),
new
PopupMenuItem
<
String
>(
value:
'value02'
,
child:
new
Text
(
'Item Two'
)),
new
PopupMenuItem
<
String
>(
value:
'value03'
,
child:
new
Text
(
'Item Three'
)),
]);
},
child:
Container
(
key:
key
,
width:
20
,
height:
20
,
color:
Colors
.
black
,
)),
),
);
}
}
class
My
extends
PopupMenuEntry
{
@override
State
<
StatefulWidget
>
createState
()
=>
MyState
();
@override
double
get
height
=>
50
;
@override
bool
represents
(
value
)
{
return
value
;
}
}
class
MyState
extends
State
<
My
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
margin:
EdgeInsets
.
all
(
15
),
height:
50
,
width:
50
,
color:
Colors
.
red
,
);
}
}
lib/MainRouter/page/test/TestPage.dart
View file @
3350f491
...
@@ -12,7 +12,6 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
...
@@ -12,7 +12,6 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import
'package:gm_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:gm_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'
;
import
'TP.dart'
;
class
TestPage
extends
StatefulWidget
{
class
TestPage
extends
StatefulWidget
{
@override
@override
...
...
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