You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			110 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			110 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Dart
		
	
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/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 {
 | 
						|
 | 
						|
  String title ="MyHomePage";
 | 
						|
  bool haveOnePatient = true;
 | 
						|
  bool have3Patient = false;
 | 
						|
  bool haveListOfPatient = true;
 | 
						|
 | 
						|
 | 
						|
  @override
 | 
						|
  State<MyHomePage> createState() => _MyHomePageState();
 | 
						|
}
 | 
						|
 | 
						|
class _MyHomePageState extends State<MyHomePage> {
 | 
						|
  @override
 | 
						|
  Widget build(BuildContext context) {
 | 
						|
    SignalRHelper signalRHelper= SignalRHelper();
 | 
						|
    return AppScaffold(
 | 
						|
      appBar: AppHeader(),
 | 
						|
      body: Column(
 | 
						|
        children: [
 | 
						|
          SizedBox(height: SizeConfig.getHeightMultiplier() * (widget.haveOnePatient?20: 2)),
 | 
						|
          widget.haveListOfPatient?
 | 
						|
          Row(
 | 
						|
            children: [
 | 
						|
              FirstColumn(
 | 
						|
                have3Patient: widget.have3Patient,
 | 
						|
              ),
 | 
						|
              const SizedBox(
 | 
						|
                width: 40,
 | 
						|
              ),
 | 
						|
              if(widget.haveListOfPatient)
 | 
						|
              Container(
 | 
						|
                width: 10,
 | 
						|
                height:SizeConfig.getHeightMultiplier()*40,
 | 
						|
                color: AppGlobal.appLightGreyColor,
 | 
						|
              ),
 | 
						|
              if(widget.haveListOfPatient)
 | 
						|
              const SizedBox(
 | 
						|
                width: 40,
 | 
						|
              ),
 | 
						|
              if(widget.haveListOfPatient)
 | 
						|
               const QueItemList()
 | 
						|
            ],
 | 
						|
          ): FirstColumn(have3Patient: widget.have3Patient,),
 | 
						|
        ],
 | 
						|
      ),
 | 
						|
      bottomSheet: Container(
 | 
						|
        color: Colors.transparent,
 | 
						|
        height: Utils.getHeight()* 0.9,
 | 
						|
        width: double.infinity,
 | 
						|
        child: Row(
 | 
						|
          children: [
 | 
						|
            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,),
 | 
						|
            ),
 | 
						|
          ],
 | 
						|
        ),
 | 
						|
      ),// This trailing comma makes auto-formatting nicer for build methods.
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
class FirstColumn extends StatelessWidget {
 | 
						|
  final bool have3Patient;
 | 
						|
 | 
						|
  const FirstColumn({Key key, this.have3Patient = false}) : super(key: key);
 | 
						|
 | 
						|
  @override
 | 
						|
  Widget build(BuildContext context) {
 | 
						|
    return Column(
 | 
						|
      mainAxisAlignment: MainAxisAlignment.start,
 | 
						|
      children:  <Widget>[
 | 
						|
        const QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true, haveListOfPatient: true,),
 | 
						|
        SizedBox(
 | 
						|
          height: SizeConfig.getHeightMultiplier() * 5,),
 | 
						|
        if(have3Patient)
 | 
						|
        Row(
 | 
						|
          mainAxisAlignment: MainAxisAlignment.spaceAround,
 | 
						|
          children: const [
 | 
						|
            QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: true, haveListOfPatient: true,),
 | 
						|
            QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: false, haveListOfPatient: true,),
 | 
						|
          ],
 | 
						|
        ),
 | 
						|
      ],
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |