Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Chad
2022-11-04 15:27:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
709503110eccd8687e512d4588718c21fb2ab912
70950311
1 parent
d6f046aa
优化代码
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
lib/poem/page/select_address_page.dart
lib/poem/page/select_address_page.dart
View file @
7095031
...
...
@@ -25,7 +25,7 @@ class AddressSelectPageState extends State<AddressSelectPage> {
final
ScrollController
_controller
=
ScrollController
();
LatLng
?
_center
;
late
GoogleMapController
mapController
;
bool
isLoading
=
fals
e
;
bool
isLoading
=
tru
e
;
Map
<
MarkerId
,
Marker
>
markers
=
<
MarkerId
,
Marker
>{};
late
StreamSubscription
_locationSubscription
;
String
radiusMax
=
"1000"
;
...
...
@@ -103,7 +103,7 @@ class AddressSelectPageState extends State<AddressSelectPage> {
@override
Widget
build
(
BuildContext
context
)
{
var
loaderView
=
const
GFLoader
().
expanded
(
flex:
11
);
var
realList
=
ListView
.
separated
(
Widget
realList
=
ListView
.
separated
(
controller:
_controller
,
itemCount:
_nearByList
.
length
,
separatorBuilder:
(
_
,
index
)
=>
const
Divider
(),
...
...
@@ -118,6 +118,9 @@ class AddressSelectPageState extends State<AddressSelectPage> {
);
},
).
expanded
(
flex:
11
);
if
(
_nearByList
.
isEmpty
)
{
realList
=
const
Center
(
child:
Text
(
"没有找到任何地点"
)).
expanded
(
flex:
11
);
}
var
listHolder
=
isLoading
?
loaderView
:
realList
;
var
searchBar
=
SearchBar
(
...
...
@@ -127,6 +130,9 @@ class AddressSelectPageState extends State<AddressSelectPage> {
_controller
.
animateTo
(
0.0
,
duration:
const
Duration
(
milliseconds:
10
),
curve:
Curves
.
ease
);
// 构造检索参数
getNearbyPlaces
(
text
);
setState
(()
{
});
},
);
var
map
=
GoogleMap
(
...
...
Please
register
or
login
to post a comment