|
|
|
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,
|
|
|
|
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,);
|
|
|
|
}
|
|
|
|
}
|