From dd3ce7cff75d3159e5ed675a07e9a60dfaec9d58 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 20 Mar 2022 08:39:52 +0300 Subject: [PATCH] small fix --- lib/home/home_screen.dart | 73 +++++++++++++++++++++++++++++++++++---- lib/home/que_item.dart | 18 +++++++--- 2 files changed, 80 insertions(+), 11 deletions(-) diff --git a/lib/home/home_screen.dart b/lib/home/home_screen.dart index 2e171be..759ab4b 100644 --- a/lib/home/home_screen.dart +++ b/lib/home/home_screen.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:queuing_system/core/base/app_scaffold_widget.dart'; +import 'package:queuing_system/core/config/config.dart'; +import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/header/app_header.dart'; import 'package:queuing_system/home/que_item.dart'; import 'package:queuing_system/utils/signalR_utils.dart'; @@ -9,6 +11,10 @@ class MyHomePage extends StatefulWidget { String title ="MyHomePage"; + bool haveOnePatient = false; + bool haveLessThan3Patient = false; + bool haveListOfPatient = true; + @override State createState() => _MyHomePageState(); @@ -20,14 +26,69 @@ class _MyHomePageState extends State { SignalRHelper signalRHelper= SignalRHelper(); return AppScaffold( appBar: AppHeader(), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: const [ - QueItem(queNo: "OBG-T45", isFirstLine: true,), + body: Column( + children: [ + SizedBox(height: SizeConfig.getHeightMultiplier() * (widget.haveOnePatient?20: 5)), + widget.haveListOfPatient?Row( + children: [ + FirstColumn(), + + Container(width: 20,height:SizeConfig.getHeightMultiplier() *40,color: Colors.grey, margin: EdgeInsets.only(left: 30),), + Column(children: [ + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true,), + + ],) + ], + ): FirstColumn(), + ], + ), + bottomSheet: Container( + color: Colors.transparent, + height: 280, + width: double.infinity, + padding: const EdgeInsets.only(left: 50, right: 50, bottom: 10,), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center , + children: [ + AppText( + "Powered By", + letterSpacing: -2.48, + color: AppGlobal.appTextColor, + fontSize: SizeConfig.getWidthMultiplier() * 3, + + ), + const SizedBox(width: 40,), + Image.asset( "assets/images/cloud_logo.png",), + ], + ), + ),// This trailing comma makes auto-formatting nicer for build methods. + ); + } +} + +class FirstColumn extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true,), + SizedBox(height: SizeConfig.getHeightMultiplier() * 5,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: true,), + QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: false,), ], ), - ), // This trailing comma makes auto-formatting nicer for build methods. + + ], ); } } diff --git a/lib/home/que_item.dart b/lib/home/que_item.dart index 8f8634c..da9d30e 100644 --- a/lib/home/que_item.dart +++ b/lib/home/que_item.dart @@ -29,10 +29,10 @@ class QueItem extends StatelessWidget { queNo, fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine - ? 8 + ? 13 : isSecondLine - ? 3.5 - : 3.2), + ? 8.5 + : 5.5), letterSpacing: -9.32, fontWeight: FontWeight.bold, ), @@ -42,14 +42,22 @@ class QueItem extends StatelessWidget { children: [ SvgPicture.asset(isNurseVisit ? "assets/images/nurseicon.svg" - : "assets/images/doctoricon.svg", height:80 ,), + : "assets/images/doctoricon.svg", height:(isFirstLine + ? 120 + : isSecondLine + ? 80 + : 70) ,), SizedBox(width: 10,), AppText( isNurseVisit ? "Please visit Nurse" : "Please visit doctor", color: isNurseVisit ? AppGlobal.appGreenColor : AppGlobal.appRedColor, - fontSize: SizeConfig.getWidthMultiplier() * (2.5), + fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine + ? 4 + : isSecondLine + ? 3 + : 3.2), letterSpacing: -2.6, fontWeight: FontWeight.w600, ),