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.
doctor_app_flutter/lib/widgets/medicine/medicine_item_widget.dart

52 lines
1.7 KiB
Dart

5 years ago
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import '../shared/rounded_container_widget.dart';
import '../shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
/*
*@author: ibrahim albitar
*@Date:28/4/2020
*@param:
*@return:
*@desc:
*/
class MedicineItemWidget extends StatefulWidget {
final String label;
final Color backgroundColor;
final bool showBorder;
final Color borderColor;
MedicineItemWidget({ @required this.label, this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white});
@override
_MedicineItemWidgetState createState() => _MedicineItemWidgetState();
}
class _MedicineItemWidgetState extends State<MedicineItemWidget> {
@override
Widget build(BuildContext context) {
return new RoundedContainer(
height: SizeConfig.heightMultiplier * 8,
child:Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
RoundedContainer(
width: SizeConfig.widthMultiplier * 2,
5 years ago
backgroundColor: Color(PRIMARY_COLOR),
margin: 0,
topLeft: 6,
topRight: 0,
bottomLeft: 6,
bottomRight: 0,
customCornerRaduis: true,
child: SizedBox(width: SizeConfig.widthMultiplier, height: SizeConfig.heightMultiplier*3,),
),
Expanded(child: Padding( padding: EdgeInsets.all(5), child: Align( alignment: Alignment.centerLeft, child: AppText(widget.label))))
],),
backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, margin: 4, raduis: 10,);
}
}