update for release1
This commit is contained in:
@ -20,6 +20,42 @@ class MapWidget extends StatelessWidget {
|
||||
|
||||
StreamSubscription? subscription;
|
||||
|
||||
Widget getMarkerShape(GeoJsonFeature i){
|
||||
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 32,
|
||||
width: 32,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
color: i.properties!['buy_point'] > 0 ? Colors.blue : Colors.red,
|
||||
width: 3,
|
||||
style: BorderStyle.solid
|
||||
)
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Icon(Icons.circle,size: 6.0,),
|
||||
i.properties!['cp'] == -1 ?
|
||||
Transform.rotate(
|
||||
alignment: Alignment.center,
|
||||
origin: Offset.fromDirection(0, 6),
|
||||
angle: 90 * pi / 180,
|
||||
child: Icon(Icons.play_arrow_outlined, color: Colors.red, size: 40,)):
|
||||
Container(color: Colors.transparent,),
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(color: Colors.white, child: Text(i.properties!['cp'] > 0 ? "${i.properties!['cp'].toString().replaceAll(regex, '')}{${i.properties!['checkin_point'].toString()}}" : "", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@ -142,26 +178,7 @@ class MapWidget extends StatelessWidget {
|
||||
// )
|
||||
// : Icon(Icons.pin_drop),
|
||||
builder: (ctx){
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 32,
|
||||
width: 32,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
color: Colors.red,
|
||||
width: 3,
|
||||
style: BorderStyle.solid
|
||||
)
|
||||
),
|
||||
child: Icon(Icons.circle,size: 6.0,)
|
||||
),
|
||||
Container(color: Colors.white, child: Text(i.properties!['cp'] > 0 ? "${i.properties!['cp'].toString().replaceAll(regex, '')}{${i.properties!['checkin_point'].toString()}}" : "", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
|
||||
],
|
||||
);
|
||||
return getMarkerShape(i);
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
|
||||
Reference in New Issue
Block a user