import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; class ScheduleItemWidget extends StatelessWidget { String title; String date; String location; ScheduleItemWidget(this.title, this.date, this.location); @override Widget build(BuildContext context) { return Stack( children: [ RoundedContainer( Container( height: SizeConfig.screenHeight * 0.20, width: SizeConfig.screenWidth * 0.80, ), raduis: 10, backgroundColor: Hexcolor('#58434F'), showBorder: true, borderColor: Hexcolor('#707070'), borderWidth: 0.5, ), Positioned( left: 10, child: RoundedContainer( Container( padding: const EdgeInsets.all(15.0), height: SizeConfig.screenHeight * 0.20, width: SizeConfig.screenWidth * 0.80, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(title, style: textStyle(2.5)), SizedBox( height: 8, ), Text(date, style: textStyle(2.5)), SizedBox( height: 8, ), Row( children: [ Icon(Icons.add_location), Text(location, style: textStyle(2.5)) ], ) ], ), ), elevation: 20, // raduis: 0, showBorder: true, borderColor: Hexcolor('#707070'), customCornerRaduis: true, bottomLeft: 0, topLeft: 0, bottomRight: 10, topRight: 10, borderWidth: 0.5), ), ], ); } TextStyle textStyle(size, [FontWeight weight]) { return TextStyle( fontSize: size * SizeConfig.textMultiplier, fontWeight: weight); } }