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:doctor_app_flutter/widgets/shared/schedule_item_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(2.5, 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(2.5)), Container( child: Column( children: litems.map((item) { return ScheduleItemWidget('ER new development ideas meeting', '09:00 AM - 10:50 AM ', 'Cloud Solution'); }).toList(), ), ), ], ); } TextStyle textStyle(size, [FontWeight weight]) { return TextStyle( fontSize: size * SizeConfig.textMultiplier, fontWeight: weight); } }