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.
39 lines
1.3 KiB
Dart
39 lines
1.3 KiB
Dart
|
|
import 'package:doctor_app_flutter/custom_widgets/rounded_container_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;
|
|
|
|
// 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});
|
|
@override
|
|
_DashboardItemTextsState createState() => _DashboardItemTextsState();
|
|
}
|
|
|
|
class _DashboardItemTextsState extends State<DashboardItemTexts> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return new RoundedContainer(Stack(
|
|
children: <Widget>[
|
|
Align(
|
|
alignment: FractionalOffset.topLeft,
|
|
child:Container(margin: EdgeInsets.all(5), child: Text(widget.label),)
|
|
),
|
|
|
|
Align(
|
|
alignment: FractionalOffset.bottomRight,
|
|
child: Container(margin: EdgeInsets.all(10), child: Text(widget.value, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 21),),)
|
|
),
|
|
|
|
],) ,backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, margin: 4,);
|
|
}
|
|
} |