Skip to content

Commit

Permalink
添加左右两边的线条
Browse files Browse the repository at this point in the history
  • Loading branch information
coldshineb committed Apr 25, 2024
1 parent 0e1217a commit 759c09d
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions lib/Pages/ScreenDoorCover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ class ScreenDoorCoverState extends State<ScreenDoorCover> with LCD {
const EdgeInsets.fromLTRB(106, 278, 0, 0),
child: showRouteLine(true),
),
routeLineLeft(),
routeLineRight(),
Container(
padding: const EdgeInsets.fromLTRB(75, 286, 0, 0),
child: showRouteIcon(true),
Expand Down Expand Up @@ -252,6 +254,8 @@ class ScreenDoorCoverState extends State<ScreenDoorCover> with LCD {
const EdgeInsets.fromLTRB(106, 278, 0, 0),
child: showRouteLine(false),
),
routeLineLeft(),
routeLineRight(),
Container(
padding: const EdgeInsets.fromLTRB(75, 286, 0, 0),
child: showRouteIcon(false),
Expand Down Expand Up @@ -447,6 +451,76 @@ class ScreenDoorCoverState extends State<ScreenDoorCover> with LCD {
);
}

//左侧顶头线条
Container routeLineLeft() {
return Container(
height: imageHeight,
width: routeImageWidth,
child: Stack(
children: [
stationList.isNotEmpty
? Positioned(
top: 278,
left: 14,
child: ClipPath(
clipper: ScreenDoorCoverRouteLineClipper(),
child: Container(
width: 50,
//每个站与站之间线条的宽度
height: lineHeight,
color: lineColor,
)))
: Container(),
stationList.isNotEmpty
? Positioned(
top: 278,
child: Container(
width: 50,
//每个站与站之间线条的宽度
height: lineHeight,
color: lineColor,
))
: Container(),
],
));
}

//右侧顶头线条
Container routeLineRight() {
return Container(
height: imageHeight,
width: routeImageWidth,
child: Stack(
children: [
stationList.isNotEmpty
? Positioned(
top: 278,
right: 64,
child: ClipPath(
clipper: ScreenDoorCoverRouteLineClipper(),
child: Container(
width: 50,
//每个站与站之间线条的宽度
height: lineHeight,
color: Util.hexToColor(
CustomColors.screenDoorCoverPassedStation),
)))
: Container(),
stationList.isNotEmpty
? Positioned(
top: 278,right: 0,
child: Container(
width: 80,
//每个站与站之间线条的宽度
height: lineHeight,
color: Util.hexToColor(
CustomColors.screenDoorCoverPassedStation),
))
: Container(),
],
));
}

MenuBar importAndExportMenubar() {
return MenuBar(children: [
Container(
Expand Down

0 comments on commit 759c09d

Please sign in to comment.