import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; class MyScheduleScreen extends StatelessWidget { List litems = [ "1", "2", ]; @override Widget build(BuildContext context) { return AppScaffold( // pageOnly: false, appBarTitle: 'My Schdule', body: Container( decoration: new BoxDecoration( gradient: LinearGradient( colors: [Colors.red[100], Colors.white], begin: Alignment.topLeft, end: Alignment.bottomRight, ), ), padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), child: ListView(children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 20, ), Text('My Schedule', style: textStyle(3, FontWeight.w700)), scheduleListByDate('Today, 7 April '), scheduleListByDate('Wednesday, 8 April '), ], ), ], ), ]), )); } Column scheduleListByDate(date) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 10, ), Text(date, style: textStyle(3)), Container( child: Column( children: litems.map((item) { return ScheduleItemWidget(); }).toList(), ), ), ], ); } TextStyle textStyle(size, [FontWeight weight]) { return TextStyle( fontSize: size * SizeConfig.textMultiplier, fontWeight: weight); } } class ScheduleItemWidget extends StatelessWidget { const ScheduleItemWidget({ Key key, }) : super(key: key); @override Widget build(BuildContext context) { return Stack( children: [ RoundedContainer( Container( height: SizeConfig.screenHeight * 0.22, width: SizeConfig.screenWidth * 0.95, decoration: BoxDecoration(border: ), // decoration: DoxD, ), backgroundColor: Colors.red, showBorder: true, borderColor: Hexcolor('#707070'), ), Positioned( left: 10, child: RoundedContainer( Container( padding: const EdgeInsets.all(15.0), height: SizeConfig.screenHeight * 0.22, width: SizeConfig.screenWidth * 0.92, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('ER new development ideas meeting ', style: textStyle(3)), SizedBox( height: 8, ), Text('09:00 AM - 10:50 AM ', style: textStyle(3)), SizedBox( height: 8, ), Row( children: [ Icon(Icons.add_location), Text('Cloud Solution ', style: textStyle(3)) ], ) ], ), ), elevation: 20, raduis: 0, showBorder: true, borderColor: Hexcolor('#707070'), ), ), ], ); } TextStyle textStyle(size, [FontWeight weight]) { return TextStyle( fontSize: size * SizeConfig.textMultiplier, fontWeight: weight); } }