Merge branch 'dev_v2.8_roaa' into 'development'

Redesign for my_schedule_screen and make it responsive to any device

See merge request Cloud_Solution/doctor_app_flutter!948
merge-requests/950/merge
Elham Ali 4 years ago
commit 956afab2b4

@ -14,7 +14,7 @@ const Map<String, Map<String, String>> localizedValues = {
"fileNo": {"en": "File No : ", "ar": "رقم الملف :"},
"mobileNo": {"en": "Mobile No", "ar": "رقم الجوال"},
"messagesScreenToolbarTitle": {"en": "Messages", "ar": "الرسائل"},
"mySchedule": {"en": "Schedule", "ar": "جدولي"},
"mySchedule": {"en": "Schedules", "ar": "جدولي"},
"errorNoSchedule": {
"en": "You don't have any Schedule",
"ar": "ليس لديك أي جدول"

@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class LandingPage extends StatefulWidget {
@ -43,17 +44,21 @@ class _LandingPageState extends State<LandingPage> {
return AppScaffold(
appBar: currentTab != 0
? AppBar(
toolbarHeight: 95,
elevation: 0,
backgroundColor: Colors.grey[100],
backgroundColor: HexColor('#FFFFFF'),
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? AppText(
getText(currentTab),
letterSpacing: -1.44,
fontWeight: FontWeight.w700,
fontSize: 24.0,
color: Color(0xff2B353E),
)
? Padding(
padding: const EdgeInsets.only(right: 188,top: 36),
child: AppText(
getText(currentTab),
letterSpacing: -1.44,
fontWeight: FontWeight.w700,
fontSize: 24.0,
color: Color(0xff2B353E),
),
)
: SizedBox(),
leading: Builder(
builder: (BuildContext context) {

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class MyScheduleScreen extends StatelessWidget {
@override
@ -20,25 +21,17 @@ class MyScheduleScreen extends StatelessWidget {
child:ErrorMessage(error: TranslationBase.of(context).errorNoSchedule,),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
color: HexColor("#EFEFEF"),
padding: EdgeInsetsDirectional.fromSTEB(21, 0, 21, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 20,
),
scheduleListByDate(model),
// scheduleListByDate('Wednesday, 8 April '),
],
),
],
),
],
),
),

@ -120,7 +120,7 @@ class _InsuranceApprovalScreenNewState
)
: Center(
child: ErrorMessage(
error: TranslationBase.of(context).referralEmptyMsg,
error: TranslationBase.of(context).errorNoInsuranceApprovals,
)),
),
)

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class MyScheduleWidget extends StatelessWidget {
@ -21,102 +22,117 @@ class MyScheduleWidget extends StatelessWidget {
List<WorkingHours> workingHours = Helpers.getWorkingHours(
workingHoursTable.workingHours,
);
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
AppText(
projectViewModel.isArabic
? AppDateUtils.getWeekDayArabic(
workingHoursTable.date.weekday)
: AppDateUtils.getWeekDay(workingHoursTable.date.weekday),
fontSize: 16,
fontFamily: 'Poppins',
// fontSize: 18
),
AppText(
' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 14,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
// fontSize: 18
),
],
return Container(
color: HexColor("#EFEFEF"),
child: Row(
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10,
),
AppText(
projectViewModel.isArabic
? AppDateUtils.getWeekDayArabic(
workingHoursTable.date.weekday)
: AppDateUtils.getWeekDay(workingHoursTable.date.weekday),
fontSize: MediaQuery.of(context).size.width*0.032,
fontFamily: 'Poppins',
// fontSize: 18
),
AppText(
' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: MediaQuery.of(context).size.width*0.05,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
// fontSize: 18
),
],
),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.55,
child: CardWithBgWidget(
bgColor: AppDateUtils.isToday(workingHoursTable.date)
? AppGlobal.appGreenColor
: Colors.transparent,
// hasBorder: false,
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (AppDateUtils.isToday(workingHoursTable.date))
AppText(
"Today",
fontSize: 1.8 * SizeConfig.textMultiplier,
fontFamily: 'Poppins',
color: AppGlobal.appGreenColor,
// fontSize: 18
Container(
width: MediaQuery.of(context).size.width * 0.65,
// width: SizeConfig.getWidthMultiplier()*64,
// height: SizeConfig.getHeightMultiplier()*18,
child: CardWithBgWidget(
marginSymmetric: 7,
hasBorder: false,
bgColor: AppDateUtils.isToday(workingHoursTable.date)
? AppGlobal.appGreenColor
: Colors.transparent,
// hasBorder: false,
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (AppDateUtils.isToday(workingHoursTable.date))
AppText(
"Today",
fontSize: 1.8 * SizeConfig.textMultiplier,
fontFamily: 'Poppins',
color: AppGlobal.appGreenColor,
// fontSize: 18
),
SizedBox(
height: 4,
),
SizedBox(
height: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) {
return Container(
margin: EdgeInsets.only(
bottom: workingHours.length > 1 ? 15 : 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
if (workingHoursTable.clinicName != null)
AppText(
workingHoursTable.clinicName ?? "",
fontSize: 15,
fontWeight: FontWeight.w700,
),
Container(
width: MediaQuery.of(context).size.width * 0.55,
child: AppText(
'${work.from} - ${work.to}',
fontSize: 15,
fontWeight: FontWeight.w300,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) {
return Container(
margin: EdgeInsets.only(
bottom: workingHours.length > 1 ? 15 : 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
),
if (workingHoursTable.projectName != null)
AppText(
workingHoursTable.projectName ?? "",
fontSize: 15,
fontWeight: FontWeight.w700,
if (workingHoursTable.clinicName != null)
Container(
width: MediaQuery.of(context).size.width * 0.65,
child: AppText(
Helpers
.convertToTitleCase(
workingHoursTable.clinicName ?? ""),
fontSize: MediaQuery.of(context).size.width*0.04,
fontWeight: FontWeight.w700,),
),
// AppText(
// workingHoursTable.clinicName ?? "",
// fontSize: 15,
// fontWeight: FontWeight.w700,
// ),
Container(
child: AppText(
'${work.from} - ${work.to}',
fontSize: MediaQuery.of(context).size.width*0.03,
fontWeight: FontWeight.w300,
),
),
],
),
);
}).toList(),
),
],
if (workingHoursTable.projectName != null)
AppText(
workingHoursTable.projectName ?? "",
fontSize: MediaQuery.of(context).size.width*0.04,
fontWeight: FontWeight.w700,
),
],
),
);
}).toList(),
),
],
),
),
),
),
),
],
],
),
);
}
}

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class CardWithBgWidget extends StatelessWidget {
@ -31,7 +32,17 @@ class CardWithBgWidget extends StatelessWidget {
border: Border.all(
color: hasBorder ? Color(0xFF707070) : Colors.transparent,
width: hasBorder ? 0.30 : 0),
boxShadow: [
BoxShadow(
color: HexColor('#0000000D').withOpacity(0.03),
//color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 5,
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Material(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
child: Stack(
@ -46,6 +57,7 @@ class CardWithBgWidget extends StatelessWidget {
bottomRight: Radius.circular(10),
),
),
width: 6,
),
bottom: 1,
@ -61,7 +73,9 @@ class CardWithBgWidget extends StatelessWidget {
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
),
width: 5,
),
bottom: 1,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save