From 2259f86607e1e7aad5c6da5d5a4c613eadfe19b5 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 30 Oct 2020 15:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=89=B2=E7=BA=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tools/widget_tool.dart | 8 ++++---- lib/ui/home/home_page.dart | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/tools/widget_tool.dart b/lib/tools/widget_tool.dart index 8b28ab4..55daaca 100644 --- a/lib/tools/widget_tool.dart +++ b/lib/tools/widget_tool.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; - +//自定义分割线 class AkuDiveder { - final bool isReverse; + final bool isReverse;//颜色方向反转 const AkuDiveder({Key key,this.isReverse=false}); Widget verticalDivider(double height) { return Container( @@ -29,8 +29,8 @@ class AkuDiveder { height: 1.w, decoration: BoxDecoration( gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, + begin: Alignment.centerLeft, + end: Alignment.centerRight, colors: isReverse ? [ Color(0xFFE8E8E8), diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 4f22b7d..eb8f0f9 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -356,7 +356,10 @@ class _HomePageState extends State { _card('22', '处理中事项', Color(0xFFFFC40C)), ], ), - AkuDiveder().horizontalDivider(343.w), + Row(children: [ + AkuDiveder().horizontalDivider(343.w), + AkuDiveder(isReverse: true).horizontalDivider(343.w) + ]), Row( children: [ _card('25', '已处理事项', Color(0xFF3F8FFE)),