From ac612f0edac74e078f38d44eeff4065ccb31dd4f Mon Sep 17 00:00:00 2001 From: Salman Afzal Date: Wed, 3 Jun 2020 16:38:56 +0300 Subject: [PATCH] dashboard and patient app --- lib/screens/dashboard_screen.dart | 597 ++++++++++-------- .../patients/patient_search_screen.dart | 39 +- .../dashboard/dashboard_item_icons_texts.dart | 93 ++- .../dashboard_item_texts_widget.dart | 61 +- .../shared/rounded_container_widget.dart | 61 +- 5 files changed, 477 insertions(+), 374 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index fc6ceb54..79c492a8 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -32,303 +32,354 @@ class DashboardScreen extends StatefulWidget { } class _DashboardScreenState extends State { - HospitalProvider projectsProvider; @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); return AppScaffold( - appBarTitle: TranslationBase.of(context).dashboardScreenToolbarTitle, - current: 0, - body: Container( - child: Column( - children: [ - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.all(10), - child: AppText( - "Today's Statistics", - fontWeight: FontWeight.bold, - ), - alignment: Alignment.centerLeft, - ), - ), - Expanded( - flex: 3, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 2, - child: RoundedContainer( - child: CircularPercentIndicator( - radius: 90.0, - animation: true, - animationDuration: 1200, - lineWidth: 7.0, - percent: .75, - center: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AppText("38", - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 4), - AppText("Out-Patients", - fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.grey[800]), - ], - ), - circularStrokeCap: CircularStrokeCap.butt, - backgroundColor: Colors.blueGrey[100], - progressColor: Colors.red, - ), + appBarTitle: TranslationBase.of(context).dashboardScreenToolbarTitle, + current: 0, + body: Container( + child: new SingleChildScrollView( + child: SizedBox( + height: MediaQuery.of(context).size.height, + child: Column( + children: [ + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.all(10), + child: AppText( + "Today's Statistics", + fontWeight: FontWeight.bold, ), + alignment: Alignment.centerLeft, ), - Expanded( - flex: 2, - child: Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - child: DashboardItemTexts( - "Arrived", - "23", - )), - Expanded( - child: DashboardItemTexts( - "Not Arrived", - "23", - ), - ), - ], + ), + Expanded( + flex: 3, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 2, + child: RoundedContainer( + child: CircularPercentIndicator( + radius: 115.0, + animation: true, + animationDuration: 1200, + lineWidth: 7.0, + percent: .75, + center: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText("38", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 4), + AppText("Out-Patients", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 1.2, + color: Colors.grey[800]), + ], + ), + circularStrokeCap: CircularStrokeCap.butt, + backgroundColor: Colors.blueGrey[100], + progressColor: Colors.red, ), ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - child: DashboardItemTexts( - "ER", - "23", - )), - Expanded( - child: DashboardItemTexts( - "Walk-in", - "23", - )), - ], - )), - ], - ), - ) - ], - ), - ), - Expanded( - flex: 2, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 2, - child: new DashboardItemIconText( - DoctorApp.home_icon, - "08", - "Lab Result", - backgroundColor: Colors.red, - ), - ), - Expanded( - flex: 2, - child: new DashboardItemIconText( - DoctorApp.home_icon, - "10", - "Radiology", - backgroundColor: Colors.red, - )), - Expanded( - flex: 2, - child: new DashboardItemIconText( - DoctorApp.home_icon, - "05", - "Referral", - backgroundColor: Colors.red, - )), - ], - ), - ), - Expanded( - flex: 2, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 2, - child: new DashboardItemIconText( - DoctorApp.home_icon, - "23", - "In-Patient", - showBorder: true, - ), + ), + Expanded( + flex: 2, + child: Padding( + padding: EdgeInsets.all(8), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.stretch, + children: [ + Expanded( + child: DashboardItemTexts( + "Arrived", + "23", + )), + Expanded( + child: DashboardItemTexts( + "Not Arrived", + "23", + ), + ), + ], + ), + ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.stretch, + children: [ + Expanded( + child: DashboardItemTexts( + "ER", + "23", + )), + Expanded( + child: DashboardItemTexts( + "Walk-in", + "23", + )), + ], + )), + ], + ), + )) + ], ), - Expanded( - flex: 2, - child: new DashboardItemIconText( - DoctorApp.home_icon, - "23", - "Operations", - showBorder: true, - )), - ], - ), - ), - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.all(10), - child: AppText( - "Patient Services", - fontWeight: FontWeight.bold, ), - alignment: Alignment.centerLeft, - ), - ), - Expanded( - flex: 2, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 2, - child: InkWell( - child: DashboardItemIconText( - DoctorApp.home_icon, - "", - "Search Patient", - showBorder: false, - backgroundColor: Colors.green[200], + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 2, + child: new DashboardItemIconText( + DoctorApp.home_icon, + "08", + "Lab Result", + backgroundColor: Colors.black45, + // valueFontColor: Colors.white, + // titleFontColor: Colors.white, + // iconColor: Colors.white, + ), ), - onTap: () { - Navigator.of(context).pushNamed(PATIENT_SEARCH); - }, - ), + Expanded( + flex: 2, + child: new DashboardItemIconText( + DoctorApp.home_icon, + "10", + "Radiology", + backgroundColor: Colors.black45, + // valueFontColor: Colors.white, + // titleFontColor: Colors.white, + // iconColor: Colors.white, + )), + Expanded( + flex: 2, + child: new DashboardItemIconText( + DoctorApp.home_icon, + "05", + "Referral", + backgroundColor: Colors.black45, + // valueFontColor: Colors.white, + // titleFontColor: Colors.white, + // iconColor: Colors.white, + )), + ], ), - Expanded( - flex: 2, - child: InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => DoctorReplyProvider(), - child: DoctorReplyScreen(), - ), - ), - ); - }, - child: DashboardItemIconText( - DoctorApp.home_icon, - "", - "Doctor Reply", - showBorder: false, - backgroundColor: Colors.deepPurple[300], + ), + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 2, + child: new DashboardItemIconText( + DoctorApp.home_icon, + "23", + "In-Patient", + showBorder: true, + backgroundColor: Colors.red[900], + ), ), + Expanded( + flex: 2, + child: new DashboardItemIconText( + DoctorApp.home_icon, + "23", + "Operations", + showBorder: true, + backgroundColor: Colors.red[900], + )), + ], + ), + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.all(10), + child: AppText( + "Patient Services", + fontWeight: FontWeight.bold, ), + alignment: Alignment.centerLeft, ), - ], - ), - ), - Expanded( - flex: 3, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - flex: 1, - child: InkWell( - child: DashboardItemIconText( - DoctorApp.home_icon, - "", - "Search Medicine", - showBorder: false, - backgroundColor: Colors.teal, + ), + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 2, + child: InkWell( + child: DashboardItemIconText( + DoctorApp.home_icon, + "", + "Search Patient", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: 16, + ), + onTap: () { + Navigator.of(context).pushNamed(PATIENT_SEARCH); + }, + ), ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => MedicineProvider(), - child: MedicineSearchScreen(), - ), + Expanded( + flex: 2, + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ChangeNotifierProvider( + create: (_) => DoctorReplyProvider(), + child: DoctorReplyScreen(), + ), + ), + ); + }, + child: DashboardItemIconText( + DoctorApp.home_icon, + "", + "Doctor Reply", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: 16, ), - ); - }, - ), + ), + ), + ], ), - Expanded( - flex: 1, - child: InkWell( - onTap: (){ - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => MyReferralPatientProvider(), - child: MyReferralPatient(), - ), + ), + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 1, + child: InkWell( + child: DashboardItemIconText( + DoctorApp.home_icon, + "", + "Search Medicine", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: 16, ), - ); - }, - child: DashboardItemIconText( - DoctorApp.home_icon, - "", - "My Referral Patient", - showBorder: false, - backgroundColor: Colors.brown[400], + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ChangeNotifierProvider( + create: (_) => MedicineProvider(), + child: MedicineSearchScreen(), + ), + ), + ); + }, + ), ), - ), - ), - - //================== - Expanded( - flex: 1, - child: InkWell( - onTap: (){ - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => MyReferredPatientProvider(), - child: MyReferredPatient(), - ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ChangeNotifierProvider( + create: (_) => MyReferralPatientProvider(), + child: MyReferralPatient(), + ), + ), + ); + }, + child: DashboardItemIconText( + DoctorApp.home_icon, + "", + "My Referral Patient", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: 16, ), - ); - }, - child: DashboardItemIconText( - DoctorApp.home_icon, - "", - "My Referred Patient", - showBorder: false, - backgroundColor: Colors.orange, + ), ), - ), + ], ), - //================== - ], - ), + ), + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ChangeNotifierProvider( + create: (_) => MyReferredPatientProvider(), + child: MyReferredPatient(), + ), + ), + ); + }, + child: DashboardItemIconText( + DoctorApp.home_icon, + "", + "My Referred Patient", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: 16, + ), + ), + ), + Expanded(flex: 1, child: Container()) + ], + )), + ], ), - ], - ), - ), - ); + //) + + // , + //constraints: new BoxConstraints(), + ), + ))); + + // Container( + + // ); } } diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index d00aabdb..dffe342c 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -59,13 +59,11 @@ class _PatientSearchScreenState extends State { void _validateInputs() async { //print("============== _selectedType============"+ _selectedType); - - try { - - //==================== - //_selectedType=='3'? - //===================== + try { + //==================== + //_selectedType=='3'? + //===================== Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = @@ -73,22 +71,22 @@ class _PatientSearchScreenState extends State { if (_formKey.currentState.validate()) { _formKey.currentState.save(); - sharedPref.setString(SLECTED_PATIENT_TYPE, _selectedType); - print('************_selectedType*************'); + print('************_selectedType*************'); print('_selectedType${_selectedType}'); String token = await sharedPref.getString(TOKEN); - + _patientSearchFormValues.TokenID = token; - _patientSearchFormValues.ProjectID = doctorProfile.projectID ;//15 + _patientSearchFormValues.ProjectID = doctorProfile.projectID; //15 _patientSearchFormValues.DoctorID = doctorProfile.doctorID; _patientSearchFormValues.ClinicID = doctorProfile.clinicID; //===================== - // _patientSearchFormValues. + // _patientSearchFormValues. //===================== - print("=============doctorProfile.clinicID="+doctorProfile.clinicID.toString()); - + print("=============doctorProfile.clinicID=" + + doctorProfile.clinicID.toString()); + Navigator.of(context).pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, "selectedType": _selectedType @@ -101,7 +99,6 @@ class _PatientSearchScreenState extends State { } catch (err) { handelCatchErrorCase(err); } - } handelCatchErrorCase(err) { @@ -154,7 +151,8 @@ class _PatientSearchScreenState extends State { children: [ Expanded( // add Expanded to have your dropdown button fill remaining space - child: DropdownButton( + child: DropdownButtonHideUnderline( + child: DropdownButton( isExpanded: true, value: _selectedType, iconSize: 40, @@ -178,7 +176,8 @@ class _PatientSearchScreenState extends State { onChanged: (String newValue) => { setState(() { _selectedType = newValue; - selectedPatientType = int.parse(_selectedType); + selectedPatientType = + int.parse(_selectedType); }) }, items: PATIENT_TYPE.map((item) { @@ -190,7 +189,7 @@ class _PatientSearchScreenState extends State { value: item['val'], ); }).toList(), - ), + )), ), ], ), @@ -249,7 +248,6 @@ class _PatientSearchScreenState extends State { _patientSearchFormValues.setLastName = "0"; } }, - inputFormatter: ONLY_LETTERS), SizedBox( height: 10, @@ -332,7 +330,8 @@ class _PatientSearchScreenState extends State { children: [ Expanded( // add Expanded to have your dropdown button fill remaining space - child: DropdownButton( + child: DropdownButtonHideUnderline( + child: DropdownButton( isExpanded: true, value: _selectedLocation, iconSize: 40, @@ -367,7 +366,7 @@ class _PatientSearchScreenState extends State { value: item['val'], ); }).toList(), - ), + )), ), ], ), diff --git a/lib/widgets/dashboard/dashboard_item_icons_texts.dart b/lib/widgets/dashboard/dashboard_item_icons_texts.dart index 527d8a8b..fc9e27c4 100644 --- a/lib/widgets/dashboard/dashboard_item_icons_texts.dart +++ b/lib/widgets/dashboard/dashboard_item_icons_texts.dart @@ -1,48 +1,79 @@ +import 'dart:ffi'; import '../shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import '../shared/app_texts_widget.dart'; class DashboardItemIconText extends StatefulWidget { - -final IconData icon; -final String value; -final String label; -final Color backgroundColor; -final bool showBorder; -final Color borderColor; - + final IconData icon; + final String value; + final String label; + final Color backgroundColor; + final bool showBorder; + final Color borderColor; + final double titleFontSize; + final Color titleFontColor; + final Color valueFontColor; + final double valueFontSize; + final Color iconColor; // OWNER : Ibrahim albitar // DATE : 05-04-2020 // DESCRIPTION : Custom widget for dashboard items has texts and icons widgets -DashboardItemIconText(this.icon, this.value, this.label, {this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white}); + DashboardItemIconText(this.icon, this.value, this.label, + {this.backgroundColor = Colors.white, + this.showBorder = false, + this.titleFontSize = 12, + this.valueFontSize = 26, + this.valueFontColor = Colors.white, + this.titleFontColor = Colors.white, + this.iconColor = Colors.white, + this.borderColor = Colors.white}); @override _DashboardItemTextsState createState() => _DashboardItemTextsState(); } + class _DashboardItemTextsState extends State { - @override + @override Widget build(BuildContext context) { return new RoundedContainer( - child:Stack( - children: [ - Align( - alignment: FractionalOffset.topLeft, - child: Container(margin: EdgeInsets.all(10), child: Icon(widget.icon,),) - ), - Align( - alignment: FractionalOffset.bottomRight, - child: Container(margin: EdgeInsets.all(10), child: Column( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText(widget.value,), - Text(widget.label), - - ],)) - ), - ], - ) ,backgroundColor: widget.backgroundColor, - showBorder: widget.showBorder, borderColor: widget.borderColor,); + margin: 10, + child: Stack( + children: [ + Align( + alignment: FractionalOffset.topLeft, + child: Container( + margin: EdgeInsets.all(10), + child: Icon( + widget.icon, + color: widget.iconColor, + ), + )), + Align( + alignment: FractionalOffset.bottomRight, + child: Container( + margin: EdgeInsets.all(10), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + widget.value, + color: widget.valueFontColor, + fontSize: widget.valueFontSize, + ), + AppText( + widget.label, + color: widget.titleFontColor, + fontSize: widget.titleFontSize, + ), + ], + ))), + ], + ), + backgroundColor: widget.backgroundColor, + showBorder: widget.showBorder, + borderColor: widget.borderColor, + ); } -} \ No newline at end of file +} diff --git a/lib/widgets/dashboard/dashboard_item_texts_widget.dart b/lib/widgets/dashboard/dashboard_item_texts_widget.dart index d7c11f5b..4b6af402 100644 --- a/lib/widgets/dashboard/dashboard_item_texts_widget.dart +++ b/lib/widgets/dashboard/dashboard_item_texts_widget.dart @@ -1,41 +1,56 @@ - import '../shared/rounded_container_widget.dart'; import '../shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; class DashboardItemTexts extends StatefulWidget { - -final String label; -final String value; -final Color backgroundColor; -final bool showBorder; -final Color borderColor; + final String label; + final String value; + final Color backgroundColor; + final bool showBorder; + final Color borderColor; // OWNER : Ibrahim albitar // DATE : 05-04-2020 // DESCRIPTION : Custom widget for dashboard items has texts widgets -DashboardItemTexts(this.label, this.value, {this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white}); + DashboardItemTexts(this.label, this.value, + {this.backgroundColor = Colors.white, + this.showBorder = false, + this.borderColor = Colors.white}); @override _DashboardItemTextsState createState() => _DashboardItemTextsState(); } class _DashboardItemTextsState extends State { - @override + @override Widget build(BuildContext context) { return new RoundedContainer( - child:Stack( - children: [ - Align( - alignment: FractionalOffset.topLeft, - child:Container(margin: EdgeInsets.all(5), child: AppText(widget.label),) - ), - - Align( - alignment: FractionalOffset.bottomRight, - child: Container(margin: EdgeInsets.all(10), child: AppText(widget.value, fontWeight: FontWeight.bold),) - ), - - ],) ,backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, margin: 4,); + child: Stack( + children: [ + Align( + alignment: FractionalOffset.topLeft, + child: Container( + margin: EdgeInsets.all(5), + child: AppText( + widget.label, + fontSize: 12, + ), + )), + Align( + alignment: FractionalOffset.bottomRight, + child: Container( + margin: EdgeInsets.all(10), + child: AppText( + widget.value, + fontWeight: FontWeight.bold, + ), + )), + ], + ), + backgroundColor: widget.backgroundColor, + showBorder: widget.showBorder, + borderColor: widget.borderColor, + margin: 4, + ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/rounded_container_widget.dart b/lib/widgets/shared/rounded_container_widget.dart index 8ffedd20..a6cb36e2 100644 --- a/lib/widgets/shared/rounded_container_widget.dart +++ b/lib/widgets/shared/rounded_container_widget.dart @@ -22,22 +22,21 @@ class RoundedContainer extends StatefulWidget { final double borderWidth; RoundedContainer( - {@required this.child, - this.width, - this.height, - this.raduis = 10, - this.backgroundColor = Colors.white, - this.margin = 10, - this.elevation = 1, - this.showBorder = false, - this.borderColor = Colors.red, - this.customCornerRaduis = false, - this.topLeft = 0, - this.topRight = 0, - this.bottomRight = 0, - this.bottomLeft = 0, - this.borderWidth =1 - }); + {@required this.child, + this.width, + this.height, + this.raduis = 10, + this.backgroundColor = Colors.white, + this.margin = 10, + this.elevation = 1, + this.showBorder = false, + this.borderColor = Colors.red, + this.customCornerRaduis = false, + this.topLeft = 0, + this.topRight = 0, + this.bottomRight = 0, + this.bottomLeft = 0, + this.borderWidth = 1}); @override _RoundedContainerState createState() => _RoundedContainerState(); @@ -47,13 +46,14 @@ class _RoundedContainerState extends State { @override Widget build(BuildContext context) { return Container( - width: widget.width, - height: widget.height, + width: widget.width, + height: widget.height, margin: EdgeInsets.all(widget.margin), decoration: widget.showBorder == true ? BoxDecoration( - color: Theme.of(context).primaryColor, - border: Border.all(color: widget.borderColor, width: widget.borderWidth), + color: Theme.of(context).primaryColor, + border: Border.all( + color: widget.borderColor, width: widget.borderWidth), borderRadius: widget.customCornerRaduis ? BorderRadius.only( topLeft: Radius.circular(widget.topLeft), @@ -61,18 +61,25 @@ class _RoundedContainerState extends State { bottomRight: Radius.circular(widget.bottomRight), bottomLeft: Radius.circular(widget.bottomLeft)) : BorderRadius.circular(widget.raduis), - ) + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 10, + blurRadius: 5, + offset: Offset(0, 5), // changes position of shadow + ), + ]) : null, child: Card( margin: EdgeInsets.all(0), shape: RoundedRectangleBorder( borderRadius: widget.customCornerRaduis - ? BorderRadius.only( - topLeft: Radius.circular(widget.topLeft), - topRight: Radius.circular(widget.topRight), - bottomRight: Radius.circular(widget.bottomRight), - bottomLeft: Radius.circular(widget.bottomLeft)) - : BorderRadius.circular(widget.raduis), + ? BorderRadius.only( + topLeft: Radius.circular(widget.topLeft), + topRight: Radius.circular(widget.topRight), + bottomRight: Radius.circular(widget.bottomRight), + bottomLeft: Radius.circular(widget.bottomLeft)) + : BorderRadius.circular(widget.raduis), ), color: widget.backgroundColor, child: widget.child,