diff --git a/lib/core/base/app_scaffold_widget.dart b/lib/core/base/app_scaffold_widget.dart index 6d457ee..3443537 100644 --- a/lib/core/base/app_scaffold_widget.dart +++ b/lib/core/base/app_scaffold_widget.dart @@ -1,11 +1,8 @@ - import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:queuing_system/core/base/project_view_model.dart'; import 'package:queuing_system/widget/app_loader_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; - - import 'base_view_model.dart'; import 'network_base_view.dart'; diff --git a/lib/core/config/config.dart b/lib/core/config/config.dart index 130d644..31b19f0 100644 --- a/lib/core/config/config.dart +++ b/lib/core/config/config.dart @@ -18,5 +18,6 @@ class AppGlobal { static Color appTextColor = const Color(0xFF2B353E); static Color scheduleTextColor = const Color(0xFF2E303A); static Color inProgressColor = const Color(0xFFCC9B14); + static Color appLightGreyColor = const Color(0xFF575757); } diff --git a/lib/header/app_header.dart b/lib/header/app_header.dart index 480dd39..8863be1 100644 --- a/lib/header/app_header.dart +++ b/lib/header/app_header.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:provider/provider.dart'; -import 'package:queuing_system/core/base/project_view_model.dart'; import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; @@ -29,11 +27,11 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget { children: [ AppText( " Current Serving", - letterSpacing: -2.48, color: Colors.white, + fontFamily: 'Poppins-SemiBold.ttf', ), - SvgPicture.asset( "assets/images/hmglogo.svg", height: 120,), + SvgPicture.asset( "assets/images/hmglogo.svg", height: 60,), ], ), ), @@ -43,5 +41,5 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget { @override Size get preferredSize => Size( double.maxFinite, - 280); + SizeConfig.getHeightMultiplier()*10); } diff --git a/lib/home/home_screen.dart b/lib/home/home_screen.dart index 7039cde..7f3f277 100644 --- a/lib/home/home_screen.dart +++ b/lib/home/home_screen.dart @@ -6,6 +6,7 @@ import 'package:queuing_system/header/app_header.dart'; import 'package:queuing_system/home/que_item.dart'; import 'package:queuing_system/home/que_item_list.dart'; import 'package:queuing_system/utils/signalR_utils.dart'; +import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; class MyHomePage extends StatefulWidget { @@ -30,34 +31,48 @@ class _MyHomePageState extends State { body: Column( children: [ SizedBox(height: SizeConfig.getHeightMultiplier() * (widget.haveOnePatient?20: 5)), - widget.haveListOfPatient?Row( + widget.haveListOfPatient? + Row( children: [ - FirstColumn(haveLessThan3Patient: widget.haveLessThan3Patient,), - - Container(width: 20,height:SizeConfig.getHeightMultiplier() *40,color: Colors.grey, margin: EdgeInsets.only(left: 30),), - QueItemList() + FirstColumn( + haveLessThan3Patient: widget.haveLessThan3Patient, + ), + const SizedBox( + width: 40, + ), + Container( + width: 10, + height:SizeConfig.getHeightMultiplier()*40, + color: Colors.grey, + ), + const SizedBox( + width: 40, + ), + const QueItemList() ], ): FirstColumn(haveLessThan3Patient: widget.haveLessThan3Patient,), ], ), bottomSheet: Container( color: Colors.transparent, - height: 280, + height: Utils.getHeight(), 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, - + Padding( + padding: const EdgeInsets.only(top: 30, left: 30), + child: AppText( + "Powered By", + letterSpacing: -1.1, + color: AppGlobal.appTextColor, + fontSize: SizeConfig.getWidthMultiplier() * 2.5, + fontFamily: 'Poppins-Medium.ttf', + ), + ), + Padding( + padding: const EdgeInsets.only(top: 40, left: 18), + child: Image.asset( "assets/images/cloud_logo.png", height: SizeConfig.getHeightMultiplier()*5,), ), - const SizedBox(width: 40,), - Image.asset( "assets/images/cloud_logo.png",), ], ), ),// This trailing comma makes auto-formatting nicer for build methods. @@ -75,17 +90,17 @@ class FirstColumn extends StatelessWidget { return Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true,), - SizedBox(height: SizeConfig.getHeightMultiplier() * 5,), + const QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true, haveListOfPatient: true,), + SizedBox( + height: SizeConfig.getHeightMultiplier() * 5,), if(haveLessThan3Patient) Row( mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: true,), - QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: false,), + children: const [ + QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: true, haveListOfPatient: true,), + QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: false, haveListOfPatient: true,), ], ), - ], ); } diff --git a/lib/home/que_item.dart b/lib/home/que_item.dart index da9d30e..6ddf07c 100644 --- a/lib/home/que_item.dart +++ b/lib/home/que_item.dart @@ -12,7 +12,7 @@ class QueItem extends StatelessWidget { this.isInListLine = false, this.queNo, this.isNurseVisit = false, - this.idDoctorVisit = false, + this.idDoctorVisit = false, this.haveListOfPatient }) : super(key: key); final bool isFirstLine; final bool isSecondLine; @@ -20,46 +20,100 @@ class QueItem extends StatelessWidget { final bool isNurseVisit; final bool idDoctorVisit; final String queNo; + final bool haveListOfPatient; @override Widget build(BuildContext context) { - return Column( - children: [ - AppText( - queNo, - fontSize: SizeConfig.getWidthMultiplier() * - (isFirstLine - ? 13 + return haveListOfPatient? + Padding( + padding: const EdgeInsets.all(30.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + AppText( + queNo, + fontSize: SizeConfig.getWidthMultiplier() * + (isFirstLine + ? 13 + : isSecondLine + ? 8.5 + : 5.5), + letterSpacing: -5.00, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins-Bold.ttf', + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SvgPicture.asset( + isNurseVisit + ? "assets/images/nurseicon.svg" + : "assets/images/doctoricon.svg", height:(isFirstLine + ? 40 : isSecondLine - ? 8.5 - : 5.5), - letterSpacing: -9.32, - fontWeight: FontWeight.bold, + ? 40 + : 40) ,), + const SizedBox(width: 8,), + AppText( + isNurseVisit ? "Please visit Nurse" : "Please visit doctor", + color: isNurseVisit + ? AppGlobal.appGreenColor + : AppGlobal.appRedColor, + fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine + ? 3.3 + : isSecondLine + ? 3.3 + : 3.3), + letterSpacing: -2.6, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins-Bold.ttf', + ), + ], + ) + ], + ), + ) + :Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only(right: 20.0, left: 20.0), + child: AppText( + queNo, + fontSize: SizeConfig.getWidthMultiplier() * + (isFirstLine + ? 13 + : isSecondLine + ? 8.5 + : 5.5), + letterSpacing: -2.6, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), ), Row( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SvgPicture.asset(isNurseVisit - ? "assets/images/nurseicon.svg" - : "assets/images/doctoricon.svg", height:(isFirstLine - ? 120 + SvgPicture.asset( + isNurseVisit + ? "assets/images/nurseicon.svg" + : "assets/images/doctoricon.svg", height:(isFirstLine + ? 40 : isSecondLine - ? 80 - : 70) ,), - SizedBox(width: 10,), + ? 40 + : 40) ,), + const SizedBox(width: 8,), AppText( - isNurseVisit ? "Please visit Nurse" : "Please visit doctor", - color: isNurseVisit - ? AppGlobal.appGreenColor - : AppGlobal.appRedColor, + isNurseVisit ? " Please visit Nurse" : " Please visit doctor", + color: AppGlobal.appLightGreyColor, fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine - ? 4 + ? 3.3 : isSecondLine - ? 3 - : 3.2), - letterSpacing: -2.6, - fontWeight: FontWeight.w600, + ? 3.3 + : 3.3), + letterSpacing: -1.6, + fontFamily: 'Poppins-Medium.ttf', ), ], ) diff --git a/lib/home/que_item_list.dart b/lib/home/que_item_list.dart index 7f2a5d0..359d88e 100644 --- a/lib/home/que_item_list.dart +++ b/lib/home/que_item_list.dart @@ -6,13 +6,21 @@ class QueItemList extends StatelessWidget { @override Widget build(BuildContext context) { - return 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,), + return SizedBox( + child: Expanded( + child: Column( + children: const [ + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), + QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), - ],); + ],), + ), + ); } } diff --git a/lib/main.dart b/lib/main.dart index ffcdf1f..ed701d3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,5 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:queuing_system/utils/signalR_utils.dart'; - -import 'core/base/app_scaffold_widget.dart'; import 'core/base/project_view_model.dart'; import 'core/config/size_config.dart'; import 'home/home_screen.dart'; diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index c585496..73ac5f3 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -176,4 +176,8 @@ class Utils { // Join/Merge all words back to one String return capitalizedWords.join(' '); } + + static getHeight() { + return SizeConfig.getHeightMultiplier()*10; + } } diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index b88033d..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,341 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity: - dependency: "direct main" - description: - name: connectivity - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - connectivity_for_web: - dependency: transitive - description: - name: connectivity_for_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0+1" - connectivity_macos: - dependency: transitive - description: - name: connectivity_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1+2" - connectivity_platform_interface: - dependency: transitive - description: - name: connectivity_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - equatable: - dependency: transitive - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_gifimage: - dependency: "direct main" - description: - name: flutter_gifimage - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - flutter_svg: - dependency: "direct main" - description: - name: flutter_svg - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - path_parsing: - dependency: transitive - description: - name: path_parsing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1+1" - signalr_core: - dependency: "direct main" - description: - name: signalr_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sse_client: - dependency: transitive - description: - name: sse_client - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.3" - tuple: - dependency: transitive - description: - name: tuple - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=2.4.0-0.0.pre"