You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.6 KiB
Dart
44 lines
1.6 KiB
Dart
|
|
import 'package:doctor_app_flutter/custom_widgets/rounded_container_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class DashboardItemIconText extends StatefulWidget {
|
|
|
|
final IconData icon;
|
|
final String value;
|
|
final String label;
|
|
final Color backgroundColor;
|
|
final bool showBorder;
|
|
final Color borderColor;
|
|
|
|
// 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});
|
|
@override
|
|
_DashboardItemTextsState createState() => _DashboardItemTextsState();
|
|
}
|
|
class _DashboardItemTextsState extends State<DashboardItemIconText> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return new RoundedContainer(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>[
|
|
Text(widget.value, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 21),),
|
|
Text(widget.label, style: TextStyle(fontWeight: FontWeight.normal, fontSize: 14),),
|
|
|
|
],))
|
|
),
|
|
],) ,backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor,);
|
|
}
|
|
} |