dashboard change

merge-requests/648/head
mosazaid 5 years ago
parent 6280904669
commit 50b4b8eb50

@ -87,6 +87,11 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 1) if (index == 1)
return RoundedContainer( return RoundedContainer(
raduis: 16, raduis: 16,
showBorder: true,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
@ -94,6 +99,11 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 0) if (index == 0)
return RoundedContainer( return RoundedContainer(
raduis: 16, raduis: 16,
showBorder: true,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
@ -101,6 +111,11 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
if (index == 2) if (index == 2)
return RoundedContainer( return RoundedContainer(
raduis: 16, raduis: 16,
showBorder: true,
borderColor: Colors.white,
shadowWidth: 0.2,
shadowSpreadRadius: 3,
shadowDy: 1,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [

@ -37,8 +37,15 @@ class GetOutPatientStack extends StatelessWidget {
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 2), margin: EdgeInsets.symmetric(horizontal: 2),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(
0.0, 1.0), // 10% of the width, so there are ten blinds.
colors: <Color>[Color(0x8FF5F6FA), Colors.red[50]], // red to yellow
tileMode: TileMode.mirror, // repeats the gradient over the canvas
),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
color: Colors.red[50], // color: Colors.red[50],
), ),
child: Stack(children: [ child: Stack(children: [
Positioned( Positioned(
@ -64,25 +71,25 @@ class GetOutPatientStack extends StatelessWidget {
child: Center( child: Center(
child: Align( child: Align(
child: FittedBox( child: FittedBox(
child: Row( child: Row(
children: [ children: [
AppText( AppText(
value.kPIParameter, value.kPIParameter,
fontSize: 10, fontSize: 10,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
' (' + value.value.toString() + ') ', ' (' + value.value.toString() + ') ',
fontSize: 12, fontSize: 12,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
),
],
), ),
)), ],
),
)),
), ),
)) ))
]), ]),

@ -9,6 +9,9 @@ class RoundedContainer extends StatefulWidget {
final double elevation; final double elevation;
final bool showBorder; final bool showBorder;
final Color borderColor; final Color borderColor;
final double shadowWidth;
final double shadowSpreadRadius;
final double shadowDy;
final bool customCornerRaduis; final bool customCornerRaduis;
final double topLeft; final double topLeft;
final double bottomRight; final double bottomRight;
@ -27,6 +30,9 @@ class RoundedContainer extends StatefulWidget {
this.elevation = 1, this.elevation = 1,
this.showBorder = false, this.showBorder = false,
this.borderColor = Colors.red, this.borderColor = Colors.red,
this.shadowWidth = 0.1,
this.shadowSpreadRadius = 10,
this.shadowDy = 5,
this.customCornerRaduis = false, this.customCornerRaduis = false,
this.topLeft = 0, this.topLeft = 0,
this.topRight = 0, this.topRight = 0,
@ -59,10 +65,10 @@ class _RoundedContainerState extends State<RoundedContainer> {
: BorderRadius.circular(widget.raduis), : BorderRadius.circular(widget.raduis),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.1), color: Colors.grey.withOpacity(widget.shadowWidth),
spreadRadius: 10, spreadRadius: widget.shadowSpreadRadius,
blurRadius: 5, blurRadius: 5,
offset: Offset(0, 5), // changes position of shadow offset: Offset(0, widget.shadowDy), // changes position of shadow
), ),
]) ])
: null, : null,

Loading…
Cancel
Save