dashboard and patient app
parent
bde30d93ec
commit
ac612f0eda
@ -1,48 +1,79 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import '../shared/rounded_container_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../shared/app_texts_widget.dart';
|
||||
|
||||
class DashboardItemIconText extends StatefulWidget {
|
||||
|
||||
final IconData icon;
|
||||
final String value;
|
||||
final String label;
|
||||
final Color backgroundColor;
|
||||
final bool showBorder;
|
||||
final Color borderColor;
|
||||
|
||||
final IconData icon;
|
||||
final String value;
|
||||
final String label;
|
||||
final Color backgroundColor;
|
||||
final bool showBorder;
|
||||
final Color borderColor;
|
||||
final double titleFontSize;
|
||||
final Color titleFontColor;
|
||||
final Color valueFontColor;
|
||||
final double valueFontSize;
|
||||
final Color iconColor;
|
||||
// OWNER : Ibrahim albitar
|
||||
// DATE : 05-04-2020
|
||||
// DESCRIPTION : Custom widget for dashboard items has texts and icons widgets
|
||||
|
||||
DashboardItemIconText(this.icon, this.value, this.label, {this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white});
|
||||
DashboardItemIconText(this.icon, this.value, this.label,
|
||||
{this.backgroundColor = Colors.white,
|
||||
this.showBorder = false,
|
||||
this.titleFontSize = 12,
|
||||
this.valueFontSize = 26,
|
||||
this.valueFontColor = Colors.white,
|
||||
this.titleFontColor = Colors.white,
|
||||
this.iconColor = Colors.white,
|
||||
this.borderColor = Colors.white});
|
||||
@override
|
||||
_DashboardItemTextsState createState() => _DashboardItemTextsState();
|
||||
}
|
||||
|
||||
class _DashboardItemTextsState extends State<DashboardItemIconText> {
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new RoundedContainer(
|
||||
child:Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: FractionalOffset.topLeft,
|
||||
child: Container(margin: EdgeInsets.all(10), child: Icon(widget.icon,),)
|
||||
),
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomRight,
|
||||
child: Container(margin: EdgeInsets.all(10), child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
AppText(widget.value,),
|
||||
Text(widget.label),
|
||||
|
||||
],))
|
||||
),
|
||||
],
|
||||
) ,backgroundColor: widget.backgroundColor,
|
||||
showBorder: widget.showBorder, borderColor: widget.borderColor,);
|
||||
margin: 10,
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: FractionalOffset.topLeft,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
color: widget.iconColor,
|
||||
),
|
||||
)),
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomRight,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
AppText(
|
||||
widget.value,
|
||||
color: widget.valueFontColor,
|
||||
fontSize: widget.valueFontSize,
|
||||
),
|
||||
AppText(
|
||||
widget.label,
|
||||
color: widget.titleFontColor,
|
||||
fontSize: widget.titleFontSize,
|
||||
),
|
||||
],
|
||||
))),
|
||||
],
|
||||
),
|
||||
backgroundColor: widget.backgroundColor,
|
||||
showBorder: widget.showBorder,
|
||||
borderColor: widget.borderColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,41 +1,56 @@
|
||||
|
||||
import '../shared/rounded_container_widget.dart';
|
||||
import '../shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashboardItemTexts extends StatefulWidget {
|
||||
|
||||
final String label;
|
||||
final String value;
|
||||
final Color backgroundColor;
|
||||
final bool showBorder;
|
||||
final Color borderColor;
|
||||
final String label;
|
||||
final String value;
|
||||
final Color backgroundColor;
|
||||
final bool showBorder;
|
||||
final Color borderColor;
|
||||
|
||||
// OWNER : Ibrahim albitar
|
||||
// DATE : 05-04-2020
|
||||
// DESCRIPTION : Custom widget for dashboard items has texts widgets
|
||||
|
||||
DashboardItemTexts(this.label, this.value, {this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white});
|
||||
DashboardItemTexts(this.label, this.value,
|
||||
{this.backgroundColor = Colors.white,
|
||||
this.showBorder = false,
|
||||
this.borderColor = Colors.white});
|
||||
@override
|
||||
_DashboardItemTextsState createState() => _DashboardItemTextsState();
|
||||
}
|
||||
|
||||
class _DashboardItemTextsState extends State<DashboardItemTexts> {
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new RoundedContainer(
|
||||
child:Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: FractionalOffset.topLeft,
|
||||
child:Container(margin: EdgeInsets.all(5), child: AppText(widget.label),)
|
||||
),
|
||||
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomRight,
|
||||
child: Container(margin: EdgeInsets.all(10), child: AppText(widget.value, fontWeight: FontWeight.bold),)
|
||||
),
|
||||
|
||||
],) ,backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, margin: 4,);
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: FractionalOffset.topLeft,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(5),
|
||||
child: AppText(
|
||||
widget.label,
|
||||
fontSize: 12,
|
||||
),
|
||||
)),
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomRight,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
child: AppText(
|
||||
widget.value,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
backgroundColor: widget.backgroundColor,
|
||||
showBorder: widget.showBorder,
|
||||
borderColor: widget.borderColor,
|
||||
margin: 4,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue