import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/home/app_provider.dart'; import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; class AppHeader extends StatelessWidget implements PreferredSizeWidget { const AppHeader({Key? key}) : super(key: key); // Widget getWeatherWidget() { // return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) { // if (appProvider.currentWeathersWidgetModel.maxTemp == null || appProvider.currentWeathersWidgetModel.minTemp == null || appProvider.currentWeathersWidgetModel.iconPhrase == null) { // return const SizedBox.shrink(); // } // return Directionality( // textDirection: appProvider.patientCallConfigurations.textDirection, // child: Row( // children: [ // SvgPicture.asset( // appProvider.currentWeathersWidgetModel.weatherIconPath ?? AppGlobal.weatherIcon, // height: SizeConfig.getHeightMultiplier() * 2.5, // color: Colors.white, // ), // const SizedBox(width: 10), // Padding( // padding: const EdgeInsets.only(top: 15), // child: AppText( // "${appProvider.patientCallConfigurations.maxText}: ${appProvider.currentWeathersWidgetModel.maxTemp}°C , ${appProvider.patientCallConfigurations.minText}: ${appProvider.currentWeathersWidgetModel.minTemp}°C", // color: Colors.white, // fontSize: SizeConfig.getHeightMultiplier() * 1.3, // ), // ), // ], // ), // ); // }); // } // // Widget getPrayerWidget() { // return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) { // if (appProvider.nextPrayerToShowWithTime.isEmpty) { // return const SizedBox.shrink(); // } // return Directionality( // textDirection: appProvider.patientCallConfigurations.textDirection, // // textDirection: appProvider.patientCallConfigurations.textDirection, // child: Row( // children: [ // SvgPicture.asset( // AppGlobal.mosqueIcon, // height: SizeConfig.getHeightMultiplier() * 2.5, // color: Colors.white, // ), // const SizedBox(width: 10), // Padding( // padding: const EdgeInsets.only(top: 15), // child: AppText( // "${appProvider.patientCallConfigurations.nextPrayerText}: ${appProvider.nextPrayerToShowWithTime}", // color: Colors.white, // fontSize: SizeConfig.getHeightMultiplier() * 1.3, // ), // ), // ], // ), // ); // }); // } @override Widget build(BuildContext context) { // return SizedBox(); return Consumer( builder: (BuildContext context, AppProvider appProvider, Widget? child) { return Container( height: 115, padding: const EdgeInsets.only(left: 20, right: 20), decoration: BoxDecoration(color: AppGlobal.vitalSignColor), child: Directionality( textDirection: appProvider.patientCallConfigurations.textDirection, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ InkWell( onTap: () async { // await appProvider.callPatientsAPI(); }, child: AppText( appProvider.patientCallConfigurations.currentServeText, color: Colors.white, ), ), // getPrayerWidget(), // getWeatherWidget(), SvgPicture.asset( "assets/images/hmglogo.svg", height: Utils.getHeight() * 0.5, ), ], ), ), ); }, ); } @override Size get preferredSize => Size(double.maxFinite, Utils.getHeight()); }