Structure Update

faiz_dev_structure_update
FaizHashmiCS22 2 years ago
parent 1a3ed42951
commit f524cee132

@ -1,25 +1,25 @@
import 'dart:developer'; import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:queuing_system/core/base/base_app_client.dart'; import 'package:queuing_system/core/base/base_app_client.dart';
import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/response_model/call_config.dart'; import 'package:queuing_system/core/response_models/call_config.dart';
import 'package:queuing_system/core/response_model/patient_call.dart'; import 'package:queuing_system/core/response_models/patient_call.dart';
import 'package:queuing_system/home/home_screen.dart';
const _getCallRequestInfoByClinicInfo = "/GetCallRequestInfo_ByIP"; const _getCallRequestInfoByClinicInfo = "/GetCallRequestInfo_ByIP";
const _callUpdateNotIsQueueRecordByIDAsync = "/CallRequest_QueueUpdate"; const _callUpdateNotIsQueueRecordByIDAsync = "/CallRequest_QueueUpdate";
class MyHttpOverrides extends HttpOverrides { class MyHttpOverrides extends HttpOverrides {
@override @override
HttpClient createHttpClient(SecurityContext context) { HttpClient createHttpClient(SecurityContext? context) {
return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true; return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
} }
} }
bool isDevMode = true;
class API { class API {
static getCallRequestInfoByClinicInfo(String deviceIp, {@required Function(List<Tickets>, List<Tickets>, CallConfig callConfig) onSuccess, @required Function(dynamic) onFailure}) async { static getCallRequestInfoByClinicInfo(String deviceIp, {required Function(List<Tickets>, List<Tickets>, CallConfig callConfig) onSuccess, required Function(dynamic) onFailure}) async {
final body = {"ipAdress": deviceIp, "apiKey": apiKey}; final body = {"ipAdress": deviceIp, "apiKey": apiKey};
if (isDevMode) { if (isDevMode) {
@ -44,7 +44,7 @@ class API {
var isQueuePatients = callPatients.where((element) => (element.callType == 1 && element.isQueue == false) || (element.callType == 2 && element.isQueue == false)).toList(); var isQueuePatients = callPatients.where((element) => (element.callType == 1 && element.isQueue == false) || (element.callType == 2 && element.isQueue == false)).toList();
// callPatients.removeWhere((element) => (element.callType == 1 && element.isQueueNurse == false) || (element.callType == 2 && element.isQueueDr == false)); // callPatients.removeWhere((element) => (element.callType == 1 && element.isQueueNurse == false) || (element.callType == 2 && element.isQueueDr == false));
callPatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp)); callPatients.sort((a, b) => a.editedOnTimeStamp!.compareTo(b.editedOnTimeStamp!));
// callPatients.addAll(isQueuePatients.toList()); // callPatients.addAll(isQueuePatients.toList());
@ -56,11 +56,12 @@ class API {
onFailure: (error, status) => onFailure(error)); onFailure: (error, status) => onFailure(error));
} }
static callUpdateNotIsQueueRecordByIDAsync(String deviceIp, {@required Tickets ticket, @required Function(List<Tickets>) onSuccess, @required Function(dynamic) onFailure}) async { static callUpdateNotIsQueueRecordByIDAsync(
if (ticket.id == null) { String deviceIp, {
return; required Tickets ticket,
} required Function(List<Tickets>) onSuccess,
required Function(dynamic) onFailure,
}) async {
List<Tickets> _ticketsUpdated = []; List<Tickets> _ticketsUpdated = [];
// for (var ticket in tickets) { // for (var ticket in tickets) {

@ -1,100 +1,54 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:queuing_system/home/app_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 'package:queuing_system/widget/data_display/app_texts_widget.dart';
import 'base_view_model.dart';
import 'network_base_view.dart';
class AppScaffold extends StatelessWidget { class AppScaffold extends StatelessWidget {
final String appBarTitle; final String appBarTitle;
final Widget body; final Widget body;
final bool isLoading; final bool isLoading;
final bool isShowAppBar; final bool isShowAppBar;
final BaseViewModel baseViewModel; final Widget? bottomSheet;
final Widget bottomSheet; final Color? backgroundColor;
final Color backgroundColor; final PreferredSizeWidget appBar;
final Widget appBar;
final Widget drawer; final Widget drawer;
final Widget bottomNavigationBar; final Widget bottomNavigationBar;
final String subtitle; final String subtitle;
final bool isHomeIcon; final bool isHomeIcon;
final bool extendBody; final bool extendBody;
final AppProvider appProvider;
const AppScaffold( const AppScaffold(
{Key key, this.appBarTitle = '', {Key? key,
this.body, this.appBarTitle = '',
required this.body,
this.isLoading = false, this.isLoading = false,
this.isShowAppBar = true, this.isShowAppBar = true,
this.baseViewModel,
this.bottomSheet, this.bottomSheet,
this.backgroundColor, this.backgroundColor,
this.isHomeIcon = true, this.isHomeIcon = true,
this.appBar, required this.appBar,
this.subtitle, this.subtitle = "",
this.drawer, this.drawer = const SizedBox.shrink(),
this.extendBody = false, this.extendBody = false,
this.bottomNavigationBar}) : super(key: key); required this.appProvider,
required this.bottomNavigationBar})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
FocusScope.of(context).requestFocus(FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
}, },
child: Scaffold( child: Scaffold(
backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
,
drawer: drawer, drawer: drawer,
extendBody: extendBody, extendBody: extendBody,
bottomNavigationBar: bottomNavigationBar, bottomNavigationBar: bottomNavigationBar,
appBar: isShowAppBar appBar: isShowAppBar ? appBar : null,
? appBar ??
AppBar(
elevation: 0,
backgroundColor: Colors.white,
title: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(appBarTitle.toUpperCase()),
if (subtitle != null)
Text(
subtitle,
style: const TextStyle(fontSize: 12, color: Colors.red),
),
],
),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: const Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: const <Widget>[
], toolbarTextStyle: const TextTheme(
titleLarge: TextStyle(
color: Colors.black87,
fontSize: 16.8,
)).bodyMedium, titleTextStyle: const TextTheme(
titleLarge: TextStyle(
color: Colors.black87,
fontSize: 16.8,
)).titleLarge,
)
: null,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body: appProvider.isInternetConnectionAvailable
? baseViewModel != null ? body
? NetworkBaseView(
baseViewModel: baseViewModel,
child: body,
)
: Stack(
children: <Widget>[body, buildAppLoaderWidget(isLoading)])
: Center( : Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -111,8 +65,4 @@ class AppScaffold extends StatelessWidget {
), ),
); );
} }
Widget buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
} }

@ -6,7 +6,7 @@ import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/utils/Utils.dart'; import 'package:queuing_system/utils/Utils.dart';
class BaseAppClient { class BaseAppClient {
static post(String endPoint, {Map<String, dynamic> body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { static post(String endPoint, {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url; String url;
url = BASE_URL + endPoint; url = BASE_URL + endPoint;
@ -21,21 +21,29 @@ class BaseAppClient {
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode); if (onFailure != null) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
}
} else { } else {
log("Response: ${response.body.toString()}"); log("Response: ${response.body.toString()}");
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode); if (onSuccess != null) {
onSuccess(parsed, statusCode);
}
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); if (onFailure != null) {
onFailure('Please Check The Internet Connection', -1);
}
} }
} catch (e) { } catch (e) {
onFailure(e.toString(), -1); if (onFailure != null) {
onFailure(e.toString(), -1);
}
} }
} }
static get(String endPoint, {Map<String, dynamic> body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { static get(String endPoint, {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url; String url;
url = BASE_URL + endPoint; url = BASE_URL + endPoint;
@ -49,16 +57,24 @@ class BaseAppClient {
final response = await http.get(Uri.parse(url), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.get(Uri.parse(url), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode); if (onFailure != null) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
}
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode); if (onSuccess != null) {
onSuccess(parsed, statusCode);
}
} }
} else { } else {
onFailure('Please Check The Internet Connection', -1); if (onFailure != null) {
onFailure('Please Check The Internet Connection', -1);
}
} }
} catch (e) { } catch (e) {
onFailure(e.toString(), -1); if (onFailure != null) {
onFailure(e.toString(), -1);
}
} }
} }

@ -1,9 +0,0 @@
//
// class BaseService {
// String error;
// bool hasError = false;
//
//
// BaseService() {
// }
// }

@ -1,50 +0,0 @@
// import 'package:flutter/material.dart';
// import 'package:provider/provider.dart';
//
// import 'base_view_model.dart';
// import 'locater.dart';
//
// class BaseView<T extends BaseViewModel> extends StatefulWidget {
// final Widget Function(BuildContext context, T model, Widget child) builder;
// final Function(T) onModelReady;
//
// BaseView({
// this.builder,
// this.onModelReady,
// });
//
// @override
// _BaseViewState<T> createState() => _BaseViewState<T>();
// }
//
// class _BaseViewState<T extends BaseViewModel> extends State<BaseView<T>> {
// T model = locator<T>();
//
// bool isLogin = false;
//
// @override
// void initState() {
// if (widget.onModelReady != null) {
// widget.onModelReady(model);
// }
//
// super.initState();
// }
//
// @override
// Widget build(BuildContext context) {
// return ChangeNotifierProvider<T>.value(
// value: model,
// child: Consumer<T>(builder: widget.builder),
// );
// }
//
// @override
// void dispose() {
// if (model != null) {
// model = null;
// }
//
// super.dispose();
// }
// }

@ -1,40 +0,0 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
import 'package:queuing_system/core/base/view_state.dart';
class BaseViewModel extends ChangeNotifier {
ViewState _state = ViewState.Idle;
bool isInternetConnection = true;
StreamSubscription subscription;
ViewState get state => _state;
String error = "";
void setState(ViewState viewState) {
_state = viewState;
notifyListeners();
}
BaseViewModel(){
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
isInternetConnection = true;
break;
case ConnectivityResult.none:
isInternetConnection = false;
break;
}
notifyListeners();
});
}
}

@ -1,11 +0,0 @@
import 'package:get_it/get_it.dart';
GetIt locator = GetIt.instance;
///di
void setupLocator() {
/// Services
/// View Model
}

@ -1,40 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:queuing_system/core/base/view_state.dart';
import 'package:queuing_system/widget/app_loader_widget.dart';
import 'package:queuing_system/widget/errors/error_message.dart';
import 'base_view_model.dart';
class NetworkBaseView extends StatelessWidget {
final BaseViewModel baseViewModel;
final Widget child;
NetworkBaseView({Key key, this.baseViewModel, this.child});
@override
Widget build(BuildContext context) {
return Container(
color: Colors.grey[100],
child: buildBaseViewWidget(),
);
}
buildBaseViewWidget() {
switch (baseViewModel.state) {
case ViewState.ErrorLocal:
case ViewState.Idle:
case ViewState.BusyLocal:
return child;
break;
case ViewState.Busy:
return AppLoaderWidget();
break;
case ViewState.Error:
return ErrorMessage(
error: baseViewModel.error,
);
break;
}
}
}

@ -1,51 +0,0 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:queuing_system/core/base/base_app_client.dart';
class ProjectViewModel with ChangeNotifier {
Locale _appLocale;
String currentLanguage = 'ar';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
bool isError = false;
String error = '';
BaseAppClient baseAppClient = BaseAppClient();
Locale get appLocal => _appLocale;
bool get isArabic => _isArabic;
StreamSubscription subscription;
ProjectViewModel() {
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
isInternetConnection = true;
break;
case ConnectivityResult.none:
isInternetConnection = false;
break;
}
notifyListeners();
});
}
@override
void dispose() {
if (subscription != null) subscription.cancel();
super.dispose();
}
}

@ -1 +0,0 @@
enum ViewState { Idle, Busy, Error, BusyLocal, ErrorLocal }

File diff suppressed because it is too large Load Diff

@ -1,16 +0,0 @@
const TOKEN = 'token';
const PROJECT_ID = 'projectID';
const VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID';
const VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID';
const LOGIN_TOKEN_ID = 'LogInToken';
const DOCTOR_ID = 'doctorID';
const SLECTED_PATIENT_TYPE = 'slectedPatientType';
const APP_Language = 'language';
const DOCTOR_PROFILE = 'doctorProfile';
const LIVE_CARE_PATIENT = 'livecare-patient-profile';
const LOGGED_IN_USER = 'loggedUser';
const EMPLOYEE_ID = 'EmployeeID';
const DASHBOARD_DATA = 'dashboard-data';
const OTP_TYPE = 'otp-type';
const LAST_LOGIN_USER = 'last-login-user';
const CLINIC_NAME = 'clinic-name';

@ -5,15 +5,15 @@ class SizeConfig {
static double _blockWidth = 0; static double _blockWidth = 0;
static double _blockHeight = 0; static double _blockHeight = 0;
static double realScreenWidth; static double realScreenWidth = 0.0;
static double realScreenHeight; static double realScreenHeight = 0.0;
static double screenWidth; static double screenWidth = 0.0;
static double screenHeight; static double screenHeight = 0.0;
static double textMultiplier; static double? textMultiplier;
static double imageSizeMultiplier; static double? imageSizeMultiplier;
static double heightMultiplier; static double? heightMultiplier;
static bool isPortrait = true; static bool isPortrait = true;
static double widthMultiplier; static double? widthMultiplier;
static bool isMobilePortrait = false; static bool isMobilePortrait = false;
static bool isMobile = false; static bool isMobile = false;
static bool isHeightShort = false; static bool isHeightShort = false;
@ -77,7 +77,7 @@ class SizeConfig {
// print('isMobilePortrait $isMobilePortrait'); // print('isMobilePortrait $isMobilePortrait');
} }
static getTextMultiplierBasedOnWidth({double width}) { static getTextMultiplierBasedOnWidth({required double width}) {
// TODO handel LandScape case // TODO handel LandScape case
if (width != null) { if (width != null) {
return width / 100; return width / 100;
@ -85,7 +85,7 @@ class SizeConfig {
return widthMultiplier; return widthMultiplier;
} }
static getWidthMultiplier({double width}) { static getWidthMultiplier({double? width}) {
// TODO handel LandScape case // TODO handel LandScape case
if (width != null) { if (width != null) {
return width / 100; return width / 100;
@ -93,7 +93,7 @@ class SizeConfig {
return widthMultiplier; return widthMultiplier;
} }
static getHeightMultiplier({double height}) { static getHeightMultiplier({double? height}) {
// TODO handel LandScape case // TODO handel LandScape case
if (height != null) { if (height != null) {
return height / 100; return height / 100;

@ -1,56 +1,56 @@
class CallConfig { class CallConfig {
int id; late int id;
bool globalClinicPrefixReq; late bool globalClinicPrefixReq;
bool clinicPrefixReq; late bool clinicPrefixReq;
int concurrentCallDelaySec; late int concurrentCallDelaySec;
int voiceType; late int voiceType;
int screenLanguage; late int screenLanguage;
int voiceLanguage; late int voiceLanguage;
int screenMaxDisplayPatients; late int screenMaxDisplayPatients;
int prioritySMS; late int prioritySMS;
int priorityWhatsApp; late int priorityWhatsApp;
int priorityEmail; late int priorityEmail;
String vitalSignText; late String vitalSignText;
String vitalSignTextN; late String vitalSignTextN;
String doctorText; late String doctorText;
String doctorTextN; late String doctorTextN;
String procedureText; late String procedureText;
String procedureTextN; late String procedureTextN;
String vaccinationText; late String vaccinationText;
String vaccinationTextN; late String vaccinationTextN;
String nebulizationText; late String nebulizationText;
String nebulizationTextN; late String nebulizationTextN;
int createdBy; late int createdBy;
String createdOn; late String createdOn;
int editedBy; late int editedBy;
String editedOn; late String editedOn;
CallConfig( CallConfig(
{this.id, {this.id = 0,
this.globalClinicPrefixReq, this.globalClinicPrefixReq = false,
this.clinicPrefixReq, this.clinicPrefixReq = false,
this.concurrentCallDelaySec, this.concurrentCallDelaySec = 8,
this.voiceType, this.voiceType = 0,
this.screenLanguage, this.screenLanguage = 1,
this.voiceLanguage, this.voiceLanguage = 1,
this.screenMaxDisplayPatients, this.screenMaxDisplayPatients = 5,
this.prioritySMS, this.prioritySMS = 1,
this.priorityWhatsApp, this.priorityWhatsApp = 1,
this.priorityEmail, this.priorityEmail = 1,
this.vitalSignText, this.vitalSignText = "",
this.vitalSignTextN, this.vitalSignTextN = "",
this.doctorText, this.doctorText = "",
this.doctorTextN, this.doctorTextN = "",
this.procedureText, this.procedureText = "",
this.procedureTextN, this.procedureTextN = "",
this.vaccinationText, this.vaccinationText = "",
this.vaccinationTextN, this.vaccinationTextN = "",
this.nebulizationText, this.nebulizationText = "",
this.nebulizationTextN, this.nebulizationTextN = "",
this.createdBy, this.createdBy = 0,
this.createdOn, this.createdOn = "",
this.editedBy, this.editedBy = 0,
this.editedOn}); this.editedOn = ""});
CallConfig.fromJson(Map<String, dynamic> json) { CallConfig.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];

@ -3,43 +3,43 @@ import 'dart:math';
import 'package:queuing_system/utils/call_type.dart'; import 'package:queuing_system/utils/call_type.dart';
class Tickets { class Tickets {
int id; late int id;
int patientID; late int patientID;
String mobileNo; late String mobileNo;
String doctorName; late String doctorName;
String doctorNameN; late String doctorNameN;
int patientGender; late int patientGender;
int callType; late int callType;
int editedOnTimeStamp; late int editedOnTimeStamp;
int concurrentCallDelaySec; late int concurrentCallDelaySec;
String roomNo; late String roomNo;
String createdOn; late String createdOn;
String editedOn; late String editedOn;
String queueNo; late String queueNo;
String callNoStr; late String callNoStr;
bool isQueue; late bool isQueue;
bool isToneReq; late bool isToneReq;
bool isVoiceReq; late bool isVoiceReq;
bool callUpdated = false; late bool callUpdated = false;
Tickets( Tickets(
{this.id, {this.id = 0,
this.patientID, this.patientID = 0,
this.mobileNo, this.mobileNo = "",
this.doctorName, this.doctorName = "",
this.doctorNameN, this.doctorNameN = "",
this.patientGender, this.patientGender = 1,
this.callType, this.callType = 1,
this.editedOnTimeStamp, this.editedOnTimeStamp = 0,
this.roomNo, this.roomNo = "",
this.createdOn, this.createdOn = "",
this.editedOn, this.editedOn = "",
this.queueNo, this.queueNo = "",
this.callNoStr, this.callNoStr = "",
this.isQueue, this.isQueue = false,
this.isToneReq, this.isToneReq = false,
this.isVoiceReq, this.isVoiceReq = false,
this.concurrentCallDelaySec}); this.concurrentCallDelaySec = 1});
int getRandomNum() { int getRandomNum() {
return Random().nextInt(9); return Random().nextInt(9);

@ -5,6 +5,8 @@ import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class AppHeader extends StatelessWidget with PreferredSizeWidget { class AppHeader extends StatelessWidget with PreferredSizeWidget {
const AppHeader({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(

@ -0,0 +1,227 @@
import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:just_audio/just_audio.dart';
import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/core/response_models/call_config.dart';
import 'package:queuing_system/core/response_models/patient_call.dart';
import 'package:queuing_system/utils/call_by_voice.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
class AppProvider extends ChangeNotifier {
AppProvider() {
startSignalHubConnection();
listenNetworkConnectivity();
}
SignalRHelper signalRHelper = SignalRHelper();
final AudioPlayer audioPlayer = AudioPlayer();
CallConfig patientCallConfigurations = CallConfig();
List<Tickets> patientTickets = [];
List<Tickets> isQueuePatients = [];
String currentDeviceIp = "";
bool isCallingInProgress = false;
bool isInternetConnectionAvailable = true;
updateInternetConnection(bool value) {
isInternetConnectionAvailable = value;
notifyListeners();
}
Future<void> getCurrentIP() async {
final ips = await NetworkInterface.list(type: InternetAddressType.IPv4);
for (var interface in ips) {
if (interface.name == "eth0") {
for (var address in interface.addresses) {
currentDeviceIp = address.address;
notifyListeners();
}
}
if (interface.name == "wlan0") {
for (var address in interface.addresses) {
currentDeviceIp = address.address;
notifyListeners();
}
}
}
}
Future<void> startSignalHubConnection() async {
if (!signalRHelper.getConnectionState()) {
signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
}
}
Future<void> callPatientsAPI() async {
patientTickets.clear();
API.getCallRequestInfoByClinicInfo(currentDeviceIp, onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) {
patientCallConfigurations = callConfigs;
if (waitingCalls.length > patientCallConfigurations.screenMaxDisplayPatients) {
patientTickets = waitingCalls.sublist(0, patientCallConfigurations.screenMaxDisplayPatients);
} else {
patientTickets = waitingCalls;
}
isQueuePatients = isQueuePatientsCalls;
notifyListeners();
}, onFailure: (error) {
log("Api call failed with this error: ${error.toString()}");
});
}
onPingReceived(data) async {
if (patientTickets.isNotEmpty) {
if ((patientTickets.first.isToneReq && isCallingInProgress) || (patientTickets.first.isVoiceReq && voiceCaller != null)) {
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
});
} else {
await callPatientsAPI();
}
} else {
await callPatientsAPI();
}
}
String getCallTypeText(Tickets ticket, CallConfig callConfig) {
final callType = ticket.getCallType();
switch (callType) {
case CallType.vitalSign:
return callConfig.vitalSignText;
case CallType.doctor:
return callConfig.doctorText;
case CallType.procedure:
return callConfig.procedureText;
case CallType.vaccination:
return callConfig.vaccinationText;
case CallType.nebulization:
return callConfig.nebulizationText;
default:
return callConfig.vitalSignText;
}
}
CallByVoice? voiceCaller;
callPatientTicket(AudioPlayer audioPlayer) async {
isCallingInProgress = true;
if (patientTickets.isNotEmpty) {
if (patientTickets.first.isToneReq && !patientTickets.first.isQueue) {
audioPlayer.setAsset("assets/tones/call_tone.mp3");
await audioPlayer.play();
await Future.delayed(const Duration(seconds: 2));
isCallingInProgress = false;
}
if (patientTickets.first.isVoiceReq && voiceCaller == null && !patientTickets.first.isQueue) {
final postVoice = getCallTypeText(patientTickets.first, patientCallConfigurations);
voiceCaller = CallByVoice(preVoice: "Ticket Number", ticketNo: patientTickets.first.queueNo.trim().toString(), postVoice: postVoice, lang: 'en');
await voiceCaller!.startCalling(patientTickets.first.queueNo.trim().toString() != patientTickets.first.callNoStr.trim().toString());
voiceCaller = null;
isCallingInProgress = false;
}
}
if (isQueuePatients.isNotEmpty) {
await Future.delayed(Duration(seconds: isQueuePatients.first.concurrentCallDelaySec)).whenComplete(() async {
if (isQueuePatients.isNotEmpty) {
isQueuePatients.removeAt(0);
}
if (patientTickets.isNotEmpty) {
// Tickets ticket = patientTickets.elementAt(0);
// patientTickets.removeAt(0);
// patientTickets.add(ticket);
}
if (isQueuePatients.isNotEmpty) {
// setState(() {});
}
});
} else {
// if (isQueuePatients.isEmpty && callFlag == 1) {
// callFlag == 0;
// await Future.delayed(const Duration(seconds: 3));
// patientTickets.clear();
// API.getCallRequestInfoByClinicInfo(DEVICE_IP, onSuccess: (waitingCalls, isQueuePatientsCalls) {
// setState(() {
// patientTickets = waitingCalls;
// isQueuePatients = isQueuePatientsCalls;
// // currents = currentInClinic;
// });
//
// log("--------------------");
// log("waiting: $patientTickets");
// log("isQueuePatients: $isQueuePatients");
// log("--------------------");
//
// updateTickets();
// }, onFailure: (error) {});
// }
}
}
Future<void> listenAudioPlayerEvents() async {
audioPlayer.playerStateStream.listen((playerState) {
if (playerState.processingState == ProcessingState.completed) {
isCallingInProgress = false;
}
});
}
updatePatientTickets() {
if (patientTickets.isNotEmpty) {
List<Tickets> _ticketsToUpdate = patientTickets.where((t) => t.callUpdated == false).toList();
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) {
log("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated");
}, onFailure: (e) {
log(" Tickets Update Failed with : ${e.toString()}");
});
}
}
updatePatientTicketByIndex(int index) {
if (patientTickets.isNotEmpty) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTickets.elementAt(index), onSuccess: (ticketsUpdated) {
log("[${patientTickets.elementAt(index).callNoStr}] Ticket Updated: $ticketsUpdated");
}, onFailure: (e) {
log(" Tickets Update ${patientTickets.elementAt(index).callNoStr} Failed with Error : ${e.toString()}");
});
}
}
onConnect() {
log("SignalR: onConnect");
}
onDisconnect(exception) {
log("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
}
onConnecting() {
log("SignalR: onConnecting");
}
listenNetworkConnectivity() async {
Connectivity().onConnectivityChanged.listen((event) async {
switch (event) {
case ConnectivityResult.wifi:
updateInternetConnection(true);
await getCurrentIP();
if (signalRHelper.connection == null || signalRHelper.connection!.state != ConnectionState.active) {
signalRHelper.connection!.start();
}
break;
case ConnectivityResult.none:
updateInternetConnection(false);
signalRHelper.closeConnection();
break;
case ConnectivityResult.mobile:
break;
}
});
}
}

@ -1,105 +1,23 @@
import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:just_audio/just_audio.dart'; import 'package:provider/provider.dart';
import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/core/base/app_scaffold_widget.dart'; import 'package:queuing_system/core/base/app_scaffold_widget.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_model/call_config.dart';
import 'package:queuing_system/core/response_model/patient_call.dart';
import 'package:queuing_system/header/app_header.dart'; import 'package:queuing_system/header/app_header.dart';
import 'package:queuing_system/home/home_screen_components.dart'; import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/call_by_voice.dart'; import 'package:queuing_system/home/priority_calls_components.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
var deviceIPGlobal = "10.10.15.11"; class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
bool isDevMode = false; // Testing IP
// var DEVICE_IP = "10.10.14.11"; // Testing IP
// var DEVICE_IP = "10.10.15.11";
// var DEVICE_IP = "10.70.249.21"; // (Make sure by Haroon before use it) Production IP
class MyHomePage extends StatefulWidget {
final String title = "MyHomePage";
const MyHomePage({Key key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
SignalRHelper signalRHelper = SignalRHelper();
CallConfig callConfigsGlobal = CallConfig();
List<Tickets> waitings = [];
List<Tickets> isQueuePatients = [];
bool isLoading = false;
@override
void dispose() {
super.dispose();
}
Future<String> getCurrentIP() async {
final ips = await NetworkInterface.list(type: InternetAddressType.IPv4);
for (var interface in ips) {
//TODO: WE WILL UPDATE THIS WHEN TESTING ON SCREEN
// if (interface.name == "wlan0") {
if (interface.name == "eth0") {
for (var address in interface.addresses) {
deviceIPGlobal = address.address;
print("IP with eth0: ${address.address}");
return deviceIPGlobal;
}
}
if (interface.name == "wlan0") {
for (var address in interface.addresses) {
deviceIPGlobal = address.address;
print("IP with wlan0: ${address.address}");
return deviceIPGlobal;
}
}
return "";
}
return "";
}
final AudioPlayer audioPlayer = AudioPlayer();
@override
void initState() {
listenNetworkConnectivity();
scheduleMicrotask(() async {
if (!signalRHelper.getConnectionState()) {
signalRHelper.startSignalRConnection(await getCurrentIP(), onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
}
});
audioPlayer.playerStateStream.listen((playerState) {
if (playerState.processingState == ProcessingState.completed) {
isCallingInProgress = false;
print("isCallingInProgress in Stream: $isCallingInProgress");
}
});
super.initState();
}
TextEditingController controller = TextEditingController();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final appProvider = context.watch<AppProvider>();
return AppScaffold( return AppScaffold(
appProvider: appProvider,
appBar: AppHeader(), appBar: AppHeader(),
body: dataContent(audioPlayer), body: dataContent(appProvider: appProvider),
bottomNavigationBar: Container( bottomNavigationBar: Container(
color: Colors.grey.withOpacity(0.1), color: Colors.grey.withOpacity(0.1),
height: Utils.getHeight(), height: Utils.getHeight(),
@ -115,16 +33,14 @@ class _MyHomePageState extends State<MyHomePage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {},
// onUpdateAvailable("");
},
child: AppText( child: AppText(
"Powered By", "Powered By",
fontSize: SizeConfig.getWidthMultiplier() * 2.6, fontSize: SizeConfig.getWidthMultiplier() * 2.6,
fontFamily: 'Poppins-Medium.ttf', fontFamily: 'Poppins-Medium.ttf',
), ),
), ),
Text(deviceIPGlobal, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)), Text(appProvider.currentDeviceIp, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)),
], ],
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
@ -140,235 +56,16 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
onUpdateIPPressed() async { Widget dataContent({required AppProvider appProvider}) {
// if (controller.text.isNotEmpty) { if (appProvider.patientTickets.isEmpty) {
// isLoading = true;
// setState(() {});
// DEVICE_IP = controller.text;
//
// await signalRHelper.connection.stop();
// if (!signalRHelper.getConnectionState()) {
// await signalRHelper.startSignalRConnection(DEVICE_IP, onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
// }
//
// controller.clear();
// waitings.clear();
// isLoading = false;
// setState(() {});
// }
}
Widget dataContent(AudioPlayer audioPlayer) {
voiceCall(audioPlayer);
// print("wlength: ${waitings.length}");
// if (waitings.length > callConfigsGlobal.screenMaxDisplayPatients) {
// final newList = waitings.sublist(0, callConfigsGlobal.screenMaxDisplayPatients );
// print("wlength: ${newList.length}");
// }
if (waitings.isEmpty) {
// No Patient in Queue // No Patient in Queue
return noPatientInQueue(); return noPatientInQueue();
} else if (waitings.length > 3) { } else if (appProvider.patientTickets.length > 3) {
// Return Content With Side List // Return Content With Side List
return priorityTicketsWithSideList(waitings, callConfigsGlobal); return priorityTicketsWithSideList(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations);
} else { } else {
// Return Content In Center Aligned // Return Content In Center Aligned
return priorityTickets(waitings, callConfigsGlobal); return PriorityTickets(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations);
}
}
String getCallTypeText(Tickets ticket, CallConfig callConfig) {
final callType = ticket.getCallType();
final language = callConfig.screenLanguage;
switch (callType) {
case CallType.vitalSign:
return callConfig.vitalSignText;
case CallType.doctor:
return callConfig.doctorText;
case CallType.procedure:
return callConfig.procedureText;
case CallType.vaccination:
return callConfig.vaccinationText;
case CallType.nebulization:
return callConfig.nebulizationText;
break;
default:
return callConfig.vitalSignText;
} }
} }
CallByVoice voiceCaller;
int callFlag = 0;
// bool isRequiredVoice({CallType callType, bool isQueue}) {
// if (callType == CallType.DOCTOR && !isQueue) {
// return true;
// }
// if (callType == CallType.NURSE && !isQueue) {
// return true;
// }
// return false;
// }
bool isCallingInProgress = false;
voiceCall(AudioPlayer audioPlayer) async {
isCallingInProgress = true;
//DONE: After calling this voice call, we should delay for milliseconds that is given by API. After that we will check if there are more patients in isQueuePatients we will remove the patient from waiting list and then update the state
if (waitings.isNotEmpty) {
if (waitings.first.isToneReq && !waitings.first.isQueue) {
audioPlayer.setAsset("assets/tones/call_tone.mp3");
await audioPlayer.play();
await Future.delayed(const Duration(seconds: 2));
isCallingInProgress = false;
}
if (waitings.first.isVoiceReq && voiceCaller == null && !waitings.first.isQueue) {
final postVoice = getCallTypeText(waitings.first, callConfigsGlobal);
voiceCaller = CallByVoice(preVoice: "Ticket Number", ticketNo: waitings.first.queueNo.trim().toString(), postVoice: postVoice, lang: 'en');
await voiceCaller.startCalling(waitings.first.queueNo.trim().toString() != waitings.first.callNoStr.trim().toString());
voiceCaller = null;
isCallingInProgress = false;
}
}
if (isQueuePatients.isNotEmpty) {
await Future.delayed(Duration(seconds: isQueuePatients.first.concurrentCallDelaySec)).whenComplete(() async {
if (isQueuePatients.isNotEmpty) {
isQueuePatients.removeAt(0);
}
if (waitings.isNotEmpty) {
// Tickets ticket = waitings.elementAt(0);
// waitings.removeAt(0);
// waitings.add(ticket);
}
if (isQueuePatients.isNotEmpty) {
// setState(() {});
}
});
} else {
// if (isQueuePatients.isEmpty && callFlag == 1) {
// callFlag == 0;
// await Future.delayed(const Duration(seconds: 3));
// waitings.clear();
// API.getCallRequestInfoByClinicInfo(DEVICE_IP, onSuccess: (waitingCalls, isQueuePatientsCalls) {
// setState(() {
// waitings = waitingCalls;
// isQueuePatients = isQueuePatientsCalls;
// // currents = currentInClinic;
// });
//
// log("--------------------");
// log("waiting: $waitings");
// log("isQueuePatients: $isQueuePatients");
// log("--------------------");
//
// updateTickets();
// }, onFailure: (error) {});
// }
}
}
Future<void> callPatientsAPI() async {
waitings.clear();
API.getCallRequestInfoByClinicInfo(deviceIPGlobal, onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) {
setState(() {
callConfigsGlobal = callConfigs;
if (waitingCalls.length > callConfigsGlobal.screenMaxDisplayPatients) {
waitings = waitingCalls.sublist(0, callConfigsGlobal.screenMaxDisplayPatients);
} else {
waitings = waitingCalls;
}
isQueuePatients = isQueuePatientsCalls;
// currents = currentInClinic;
});
log("--------------------");
log("waiting: $waitings");
log("isQueuePatients: $isQueuePatients");
log("--------------------");
updateTickets();
}, onFailure: (error) {});
}
onUpdateAvailable(data) async {
// if (isQueuePatients.isNotEmpty && callFlag == 0) {
// callFlag = 1;
// return;
// }
if (waitings.isNotEmpty) {
print("isCallingInProgress: ${isCallingInProgress}");
print("voiceCaller: ${voiceCaller == null}");
if ((waitings.first.isToneReq && isCallingInProgress) || (waitings.first.isVoiceReq && voiceCaller != null)) {
// if (true) {
print("I will wait now for ${callConfigsGlobal.concurrentCallDelaySec} seconds");
Timer(Duration(seconds: callConfigsGlobal.concurrentCallDelaySec), () async {
await callPatientsAPI();
});
} else {
await callPatientsAPI();
}
} else {
await callPatientsAPI();
}
}
updateTickets() {
if (waitings != null && waitings.isNotEmpty) {
List<Tickets> _ticketsToUpdate = waitings.where((t) => t.callUpdated == false).toList();
API.callUpdateNotIsQueueRecordByIDAsync(deviceIPGlobal, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) {
log("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated");
}, onFailure: (e) {
log("API UPDate Tickets Failed with : ${e.toString()}");
});
}
}
onConnect() {
log("SignalR: onConnect");
}
onDisconnect(exception) {
log("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(deviceIPGlobal, onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
}
onConnecting() {
log("SignalR: onConnecting");
}
listenNetworkConnectivity() async {
Connectivity().onConnectivityChanged.listen((event) async {
switch (event) {
case ConnectivityResult.wifi:
await getCurrentIP();
signalRHelper.connection.start();
break;
case ConnectivityResult.none:
signalRHelper.closeConnection(context);
break;
case ConnectivityResult.mobile:
break;
}
});
}
} }
// if (isQueuePatients.length > 1) {
// Timer(Duration(milliseconds: int.parse(waitings.first.queueDuration)), () {
// Tickets calledTicket = Tickets();
// if (isQueuePatients.isNotEmpty) {
// calledTicket = isQueuePatients.elementAt(0);
// isQueuePatients.removeAt(0);
// }
// if (waitings.isNotEmpty) {
// // Tickets ticket = waitings.elementAt(0);
// // waitings.removeAt(0);
// // waitings.add(ticket);
// }
// if (isQueuePatients.isNotEmpty) {
// // setState(() {});
// }
// });
// }

@ -1,98 +0,0 @@
import 'package:flutter/material.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_model/call_config.dart';
import 'package:queuing_system/core/response_model/patient_call.dart';
import 'package:queuing_system/home/priority_calls.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
Widget noPatientInQueue() {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9),
),
],
);
}
Widget priorityTickets(List<Tickets> tickets, CallConfig callConfig) {
return PriorityTickets(tickets, callConfig);
}
Widget priorityTicketsWithSideList(List<Tickets> tickets, CallConfig callConfig) {
final priorityTickets = tickets.sublist(0, 3);
final otherTickets = tickets.sublist(3, tickets.length);
return Row(
children: [
Expanded(flex: 7, child: PriorityTickets(priorityTickets, callConfig)),
Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)),
Expanded(
flex: 5,
child: ListView.builder(
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 50),
itemCount: otherTickets.length,
itemBuilder: (ctx, idx) {
final itm = otherTickets[idx];
return Padding(
padding: const EdgeInsets.all(8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: SizeConfig.getWidthMultiplier() * 19,
child: AppText(
itm.queueNo.toString(),
letterSpacing: -2,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 4,
textAlign: TextAlign.center,
),
),
const SizedBox(width: 5),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
SizedBox(
width: SizeConfig.getWidthMultiplier() * 3,
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
),
const SizedBox(width: 10),
SizedBox(
width: SizeConfig.getWidthMultiplier() * 28,
child: AppText(
itm.getCallType().message(callConfig),
color: itm.getCallType().color(),
letterSpacing: -1.5,
fontSize: SizeConfig.getWidthMultiplier() * 3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
),
Container(
color: Colors.grey.withOpacity(0.3),
width: 6,
height: SizeConfig.getHeightMultiplier() * 3,
margin: const EdgeInsets.symmetric(horizontal: 10),
),
AppText(
"Room: ${itm.roomNo}",
color: itm.getCallType().color(),
letterSpacing: -1.5,
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
],
)
],
),
);
},
),
)
],
);
}

@ -1,8 +1,8 @@
import 'package:blinking_text/blinking_text.dart'; import 'package:blinking_text/blinking_text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_model/call_config.dart'; import 'package:queuing_system/core/response_models/call_config.dart';
import 'package:queuing_system/core/response_model/patient_call.dart'; import 'package:queuing_system/core/response_models/patient_call.dart';
import 'package:queuing_system/utils/call_type.dart'; import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
@ -10,7 +10,7 @@ class PriorityTickets extends StatelessWidget {
final List<Tickets> tickets; final List<Tickets> tickets;
final CallConfig callConfig; final CallConfig callConfig;
const PriorityTickets(this.tickets, this.callConfig, {Key key}) : super(key: key); const PriorityTickets({required this.tickets, required this.callConfig, Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -66,13 +66,13 @@ class TicketItem extends StatelessWidget {
final CallConfig callConfig; final CallConfig callConfig;
const TicketItem({ const TicketItem({
Key key, Key? key,
@required this.isClinicAdded, required this.isClinicAdded,
@required this.ticketNo, required this.ticketNo,
@required this.roomNo, required this.roomNo,
@required this.callType, required this.callType,
@required this.callConfig, required this.callConfig,
this.scale, required this.scale,
this.blink = false, this.blink = false,
}) : super(key: key); }) : super(key: key);
@ -139,3 +139,90 @@ class TicketItem extends StatelessWidget {
); );
} }
} }
Widget noPatientInQueue() {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9),
),
],
);
}
Widget priorityTicketsWithSideList({required List<Tickets> tickets, required CallConfig callConfig}) {
final priorityTickets = tickets.sublist(0, 3);
final otherTickets = tickets.sublist(3, tickets.length);
return Row(
children: [
Expanded(flex: 7, child: PriorityTickets(callConfig: callConfig, tickets: priorityTickets)),
Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)),
Expanded(
flex: 5,
child: ListView.builder(
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 50),
itemCount: otherTickets.length,
itemBuilder: (ctx, idx) {
final itm = otherTickets[idx];
return Padding(
padding: const EdgeInsets.all(8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: SizeConfig.getWidthMultiplier() * 19,
child: AppText(
itm.queueNo.toString(),
letterSpacing: -2,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 4,
textAlign: TextAlign.center,
),
),
const SizedBox(width: 5),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
SizedBox(
width: SizeConfig.getWidthMultiplier() * 3,
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
),
const SizedBox(width: 10),
SizedBox(
width: SizeConfig.getWidthMultiplier() * 28,
child: AppText(
itm.getCallType().message(callConfig),
color: itm.getCallType().color(),
letterSpacing: -1.5,
fontSize: SizeConfig.getWidthMultiplier() * 3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
),
Container(
color: Colors.grey.withOpacity(0.3),
width: 6,
height: SizeConfig.getHeightMultiplier() * 3,
margin: const EdgeInsets.symmetric(horizontal: 10),
),
AppText(
"Room: ${itm.roomNo}",
color: itm.getCallType().color(),
letterSpacing: -1.5,
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
],
)
],
),
);
},
),
)
],
);
}

@ -1,27 +0,0 @@
// import 'package:flutter/material.dart';
// import 'package:queuing_system/core/config/size_config.dart';
// import 'package:queuing_system/home/que_item/que_item.dart';
//
// class QueItemList extends StatelessWidget {
// const QueItemList({Key key}) : super(key: key);
//
// @override
// Widget build(BuildContext context) {
// return SizedBox(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// SizedBox(height: SizeConfig.getHeightMultiplier() *2.3,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,),
//
// ],),
// );
// }
// }

@ -3,14 +3,14 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:queuing_system/core/api.dart'; import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:wakelock/wakelock.dart'; import 'package:wakelock/wakelock.dart';
import 'core/base/project_view_model.dart';
import 'core/config/size_config.dart'; import 'core/config/size_config.dart';
import 'home/home_screen.dart'; import 'home/home_screen.dart';
// import 'home/home_screen_bkp.dart'; // import 'home/home_screen_bkp.dart';
void main() { void main() {
//TODO: WE HAVE TO UPDATE THIS BEFORE GOING LIVE. //TODO: WE HAVE TO UPDATE THIS BEFORE GOING LIVE.
HttpOverrides.global = MyHttpOverrides(); HttpOverrides.global = MyHttpOverrides();
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
@ -23,7 +23,7 @@ void main() {
//TODO: WE NEED TO IMPLEMENT THE AVAILABILITY MONITORING OF THE SCREENS LIKE IF THEY ARE TURNED ON OR NOT!! //TODO: WE NEED TO IMPLEMENT THE AVAILABILITY MONITORING OF THE SCREENS LIKE IF THEY ARE TURNED ON OR NOT!!
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key); const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application. // This widget is the root of your application.
@override @override
@ -33,28 +33,23 @@ class MyApp extends StatelessWidget {
return OrientationBuilder(builder: (context, orientation) { return OrientationBuilder(builder: (context, orientation) {
SizeConfig().init(constraints, orientation); SizeConfig().init(constraints, orientation);
return MultiProvider( return MultiProvider(
providers: [ providers: [
ChangeNotifierProvider<AppProvider>(create: (context) => AppProvider()),
ChangeNotifierProvider<ProjectViewModel>( ],
create: (context) => ProjectViewModel(), child: MaterialApp(
), showSemanticsDebugger: false,
], title: 'Doctors App',
child: Consumer<ProjectViewModel>( theme: ThemeData(
builder: (context, projectProvider, child) => MaterialApp( primaryColor: Colors.grey,
showSemanticsDebugger: false, fontFamily: 'Poppins',
title: 'Doctors App', dividerColor: Colors.grey[350],
theme: ThemeData( colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)),
primaryColor: Colors.grey, ),
fontFamily: 'Poppins', home: const MyHomePage(),
dividerColor: Colors.grey[350], colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)), debugShowCheckedModeBanner: false,
), ));
home:const MyHomePage() ,
debugShowCheckedModeBanner: false,
)),
);
}); });
}, },
); );
} }
} }

@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart'; import 'dart:developer';
import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_tts/flutter_tts.dart';
class CallByVoice { class CallByVoice {
@ -7,7 +8,7 @@ class CallByVoice {
final String ticketNo; final String ticketNo;
final String postVoice; final String postVoice;
CallByVoice({this.lang = 'en', @required this.ticketNo, @required this.preVoice, @required this.postVoice}); CallByVoice({this.lang = 'en', required this.ticketNo, required this.preVoice, required this.postVoice});
final FlutterTts textToSpeech = FlutterTts(); final FlutterTts textToSpeech = FlutterTts();
@ -16,10 +17,9 @@ class CallByVoice {
double rate = 0.2; double rate = 0.2;
startCalling(bool isClinicNameAdded) async { startCalling(bool isClinicNameAdded) async {
// print("langs: ${(await textToSpeech.setEngine("com.google.android.tts"))}"); log("langs: ${(await textToSpeech.getVoices).toString()}");
print("langs: ${(await textToSpeech.getVoices).toString()}"); log("langs: ${(await textToSpeech.getLanguages).toString()}");
print("langs: ${(await textToSpeech.getLanguages).toString()}"); log("langs: ${(await textToSpeech.getEngines).toString()}");
print("langs: ${(await textToSpeech.getEngines).toString()}");
String clinicName = ""; String clinicName = "";
String patientAlpha = ""; String patientAlpha = "";

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/response_model/call_config.dart'; import 'package:queuing_system/core/response_models/call_config.dart';
enum CallType { vitalSign, doctor, procedure, vaccination, nebulization, none } enum CallType { vitalSign, doctor, procedure, vaccination, nebulization, none }
@ -43,9 +43,7 @@ extension XCallType on CallType {
} }
} }
SvgPicture icon( SvgPicture icon(double height) {
double height,
) {
if (this == CallType.vitalSign) { if (this == CallType.vitalSign) {
return SvgPicture.asset("assets/images/nurseicon.svg", height: height, color: color()); return SvgPicture.asset("assets/images/nurseicon.svg", height: height, color: color());
} else if (this == CallType.doctor) { } else if (this == CallType.doctor) {

@ -1,3 +1,4 @@
import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -23,13 +24,11 @@ class SignalRHelper {
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub?IPAddress=10.10.14.20"; // String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub?IPAddress=10.10.14.20";
// "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273"; // "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273";
String msg = "Awaiting Patients Arrival"; String msg = "Awaiting Patients Arrival";
HubConnection connection; HubConnection? connection;
startSignalRConnection(String deviceIp, startSignalRConnection(String deviceIp,
{@required Function(dynamic) onUpdateAvailable, @required VoidCallback onConnect, @required Function(dynamic) onDisconnect, @required VoidCallback onConnecting}) async { {required Function(dynamic) onUpdateAvailable, required VoidCallback onConnect, required Function(dynamic) onDisconnect, required VoidCallback onConnecting}) async {
// Hardcoded IP For Testing log("Connecting Signal R with: $deviceIp");
// deviceIp = "10.10.14.11";
print("Connecting Signal R with: $deviceIp");
final url = hubBaseURL + "?IPAddress=$deviceIp"; final url = hubBaseURL + "?IPAddress=$deviceIp";
// final url = hubBaseURL; // final url = hubBaseURL;
@ -39,47 +38,41 @@ class SignalRHelper {
HttpConnectionOptions( HttpConnectionOptions(
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true), client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
transport: HttpTransportType.serverSentEvents, transport: HttpTransportType.serverSentEvents,
logging: (level, message) => { logging: (level, message) => log(message),
print(message),
},
)) ))
.build(); .build();
connection.onclose(onDisconnect); connection!.onclose(onDisconnect);
connection.onreconnecting((exception) => onConnecting()); connection!.onreconnecting((exception) => onConnecting());
connection.onreconnected((connectionId) => onConnect()); connection!.onreconnected((connectionId) => onConnect());
connection.on('addChatMessage', (message) { connection!.on('addChatMessage', (message) => onUpdateAvailable(message));
onUpdateAvailable(message);
});
// try { await connection!.start();
await connection.start();
// } catch (e, s) {
// print("Here the error: ${e.toString()}");
// }
} }
void sendMessage(List<dynamic> args) async { void sendMessage(List<dynamic> args) async {
await connection.invoke('SendMessage', args: args); //['Bob', 'Says hi!'] await connection!.invoke('SendMessage', args: args); //['Bob', 'Says hi!']
} }
bool getConnectionState() { bool getConnectionState() {
if (connection == null) return false; if (connection == null) return false;
if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) return true; log("connectionState: ${connection!.state}");
if (connection.state == HubConnectionState.disconnected || connection.state == HubConnectionState.disconnecting) return false; if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) return true;
if (connection!.state == HubConnectionState.disconnected || connection!.state == HubConnectionState.disconnecting) return false;
return false;
} }
closeConnection(BuildContext context) async { closeConnection() async {
if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) { if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
await connection.stop(); await connection!.stop();
} }
} }
startConnection(BuildContext context) async { startConnection(BuildContext context) async {
if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) { if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
connection.off('addChatMessage'); connection!.off('addChatMessage');
await connection.start(); await connection!.start();
} }
} }
} }

@ -1,30 +1,11 @@
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:queuing_system/core/base/locater.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class Utils { class Utils {
static getHeight() {
return SizeConfig.getHeightMultiplier() * 7;
static TextStyle textStyle(context) =>
TextStyle(color: Theme.of(context).primaryColor);
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;
} else {
return false;
}
} }
static generateContactAdminMsg([err = null]) { static generateContactAdminMsg([err = null]) {
//TODO: Add translation //TODO: Add translation
String localMsg = 'Something wrong happened, please contact the admin'; String localMsg = 'Something wrong happened, please contact the admin';
@ -34,150 +15,151 @@ class Utils {
return localMsg; return localMsg;
} }
static Future<bool> checkConnection() async {
static getCardBoxDecoration() { ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity());
return BoxDecoration( if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) {
borderRadius: BorderRadius.circular(10), return true;
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
color: Color(0xFF0000000D),
spreadRadius: 10,
blurRadius: 27,
offset: Offset(0, -3), // changes position of shadow
),
],
);
}
navigateToUpdatePage(String message, String androidLink, iosLink) {
// locator<NavigationService>().pushAndRemoveUntil(
// FadePage(
// page: UpdatePage(
// message: message,
// androidLink: androidLink,
// iosLink: iosLink,
// ),
// ),
// );
// Navigator.pushAndRemoveUntil(
// AppGlobal.CONTEX,
// FadePage(
// page: UpdatePage(
// message: message,
// androidLink: androidLink,
// iosLink: iosLink,
// ),
// ),
// (r) => false);
}
static InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon, Color dropDownColor}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.arrow_drop_down,
color: dropDownColor != null ? dropDownColor : Colors.black,
)
: null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
static BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor,
{double borderWidth = -1}) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: borderWidth == -1 ? 2.0 : borderWidth,
)),
);
}
/// hides the keyboard if its already open
static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus();
}
static String capitalize(str) {
if (str != "") {
return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
} else { } else {
return str; return false;
}
}
static bool isTextHtml(String text) {
var htmlRegex = RegExp("<(“[^”]*”|'[^]*|[^'”>])*>");
return htmlRegex.hasMatch(text);
}
static String timeFrom({Duration duration}) {
String twoDigits(int n) => n.toString().padLeft(2, "0");
String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds";
}
static String convertToTitleCase(String text) {
if (text == null) {
return null;
}
if (text.length <= 1) {
return text.toUpperCase();
} }
// Split string into multiple words
final List<String> words = text.split(' ');
// Capitalize first letter of each words
final capitalizedWords = words.map((word) {
if (word.trim().isNotEmpty) {
final String firstLetter = word.trim().substring(0, 1).toUpperCase();
final String remainingLetters = word.trim().substring(1).toLowerCase();
return '$firstLetter$remainingLetters';
}
return '';
});
// Join/Merge all words back to one String
return capitalizedWords.join(' ');
}
static getHeight() {
return SizeConfig.getHeightMultiplier()*7;
} }
// static TextStyle textStyle(context) => TextStyle(color: Theme.of(context).primaryColor);
//
//
//
// static getCardBoxDecoration() {
// return BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: Colors.white,
// shape: BoxShape.rectangle,
// boxShadow: [
// BoxShadow(
// color: Color(0xFF0000000D),
// spreadRadius: 10,
// blurRadius: 27,
// offset: Offset(0, -3), // changes position of shadow
// ),
// ],
// );
// }
//
// navigateToUpdatePage(String message, String androidLink, iosLink) {
// // locator<NavigationService>().pushAndRemoveUntil(
// // FadePage(
// // page: UpdatePage(
// // message: message,
// // androidLink: androidLink,
// // iosLink: iosLink,
// // ),
// // ),
// // );
//
// // Navigator.pushAndRemoveUntil(
// // AppGlobal.CONTEX,
// // FadePage(
// // page: UpdatePage(
// // message: message,
// // androidLink: androidLink,
// // iosLink: iosLink,
// // ),
// // ),
// // (r) => false);
// }
//
// static InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {Icon suffixIcon, Color dropDownColor}) {
// return InputDecoration(
// focusedBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// enabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// disabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// hintText: selectedText != null ? selectedText : hintText,
// suffixIcon: isDropDown
// ? suffixIcon != null
// ? suffixIcon
// : Icon(
// Icons.arrow_drop_down,
// color: dropDownColor != null ? dropDownColor : Colors.black,
// )
// : null,
// hintStyle: TextStyle(
// fontSize: 14,
// color: Colors.grey.shade600,
// ),
// );
// }
//
// static BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor, {double borderWidth = -1}) {
// return BoxDecoration(
// color: containerColor,
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.all(Radius.circular(8)),
// border: Border.fromBorderSide(BorderSide(
// color: borderColor,
// width: borderWidth == -1 ? 2.0 : borderWidth,
// )),
// );
// }
//
// /// hides the keyboard if its already open
// static hideKeyboard(BuildContext context) {
// FocusScope.of(context).unfocus();
// }
//
// static String capitalize(str) {
// if (str != "") {
// return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
// } else {
// return str;
// }
// }
//
// static bool isTextHtml(String text) {
// var htmlRegex = RegExp("<(“[^”]*”|'[^]*|[^'”>])*>");
// return htmlRegex.hasMatch(text);
// }
//
// static String timeFrom({Duration duration}) {
// String twoDigits(int n) => n.toString().padLeft(2, "0");
// String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
// String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
// return "$twoDigitMinutes:$twoDigitSeconds";
// }
//
// static String convertToTitleCase(String text) {
// if (text == null) {
// return null;
// }
//
// if (text.length <= 1) {
// return text.toUpperCase();
// }
//
// // Split string into multiple words
// final List<String> words = text.split(' ');
//
// // Capitalize first letter of each words
// final capitalizedWords = words.map((word) {
// if (word.trim().isNotEmpty) {
// final String firstLetter = word.trim().substring(0, 1).toUpperCase();
// final String remainingLetters = word.trim().substring(1).toLowerCase();
//
// return '$firstLetter$remainingLetters';
// }
// return '';
// });
//
// // Join/Merge all words back to one String
// return capitalizedWords.join(' ');
// }
//
} }

@ -1,32 +1,32 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:queuing_system/widget/loader/gif_loader_container.dart'; // import 'package:queuing_system/widget/loader/gif_loader_container.dart';
//
class AppLoaderWidget extends StatefulWidget { // class AppLoaderWidget extends StatefulWidget {
AppLoaderWidget({Key key, this.title, this.containerColor}) : super(key: key); // AppLoaderWidget({Key? key, this.title, this.containerColor}) : super(key: key);
//
final String title; // final String title;
final Color containerColor; // final Color containerColor;
//
@override // @override
_AppLoaderWidgetState createState() => _AppLoaderWidgetState(); // _AppLoaderWidgetState createState() => _AppLoaderWidgetState();
} // }
//
class _AppLoaderWidgetState extends State<AppLoaderWidget> { // class _AppLoaderWidgetState extends State<AppLoaderWidget> {
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
return SizedBox( // return SizedBox(
height: MediaQuery.of(context).size.height, // height: MediaQuery.of(context).size.height,
child: Stack( // child: Stack(
children: [ // children: [
Container( // Container(
color: widget.containerColor ?? Colors.grey.withOpacity(0.6), // color: widget.containerColor ?? Colors.grey.withOpacity(0.6),
), // ),
Container( // Container(
child: GifLoaderContainer(), // child: GifLoaderContainer(),
margin: EdgeInsets.only( // margin: EdgeInsets.only(
bottom: MediaQuery.of(context).size.height * 0.09)) // bottom: MediaQuery.of(context).size.height * 0.09))
], // ],
), // ),
); // );
} // }
} // }

@ -3,35 +3,36 @@ import 'package:queuing_system/core/config/size_config.dart';
class AppText extends StatefulWidget { class AppText extends StatefulWidget {
final String text; final String text;
final String variant; final String? variant;
final Color color; final Color color;
final FontWeight fontWeight; final FontWeight? fontWeight;
final double fontSize; final double? fontSize;
final double fontHeight; final double? fontHeight;
final String fontFamily; final String fontFamily;
final int maxLength; final int maxLength;
final bool italic; final bool italic;
final double margin; final double? margin;
final double marginTop; final double marginTop;
final double marginRight; final double marginRight;
final double marginBottom; final double marginBottom;
final double marginLeft; final double marginLeft;
final double letterSpacing; final double? letterSpacing;
final TextAlign textAlign; final TextAlign? textAlign;
final bool bold; final bool? bold;
final bool regular; final bool? regular;
final bool medium; final bool? medium;
final int maxLines; final int? maxLines;
final bool readMore; final bool readMore;
final String style; final String? style;
final bool allowExpand; final bool allowExpand;
final bool visibility; final bool visibility;
final TextOverflow textOverflow; final TextOverflow? textOverflow;
final TextDecoration textDecoration; final TextDecoration? textDecoration;
final bool isCopyable; final bool isCopyable;
const AppText( const AppText(
this.text, {Key key, this.text, {
Key? key,
this.color = Colors.black, this.color = Colors.black,
this.fontWeight, this.fontWeight,
this.variant, this.variant,
@ -95,13 +96,7 @@ class _AppTextState extends State<AppText> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
child: Container( child: Container(
margin: widget.margin != null margin: widget.margin != null ? EdgeInsets.all(widget.margin!) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
? EdgeInsets.all(widget.margin)
: EdgeInsets.only(
top: widget.marginTop,
right: widget.marginRight,
bottom: widget.marginBottom,
left: widget.marginLeft),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -116,21 +111,16 @@ class _AppTextState extends State<AppText> {
right: 0, right: 0,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(colors: [
colors: [ Theme.of(context).colorScheme.background,
Theme.of(context).backgroundColor, Theme.of(context).colorScheme.background.withOpacity(0),
Theme.of(context).backgroundColor.withOpacity(0), ], begin: Alignment.bottomCenter, end: Alignment.topCenter)),
],
begin: Alignment.bottomCenter,
end: Alignment.topCenter)),
height: 30, height: 30,
), ),
) )
], ],
), ),
if (widget.allowExpand && if (widget.allowExpand && widget.readMore && text.length > widget.maxLength)
widget.readMore &&
text.length > widget.maxLength)
Padding( Padding(
padding: const EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), padding: const EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell( child: InkWell(
@ -140,7 +130,7 @@ class _AppTextState extends State<AppText> {
}); });
}, },
child: Text(hidden ? "Read More" : "Read less", child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith( style: _getFontStyle()?.copyWith(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "Poppins", fontFamily: "Poppins",
@ -160,13 +150,7 @@ class _AppTextState extends State<AppText> {
textSelectionTheme: const TextSelectionThemeData(selectionColor: Colors.lightBlueAccent), textSelectionTheme: const TextSelectionThemeData(selectionColor: Colors.lightBlueAccent),
), ),
child: SelectableText( child: SelectableText(
!hidden !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)),
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign, textAlign: widget.textAlign,
// overflow: widget.maxLines != null // overflow: widget.maxLines != null
// ? ((widget.maxLines > 1) // ? ((widget.maxLines > 1)
@ -175,18 +159,12 @@ class _AppTextState extends State<AppText> {
// : null, // : null,
maxLines: widget.maxLines, maxLines: widget.maxLines,
style: widget.style != null style: widget.style != null
? _getFontStyle().copyWith( ? _getFontStyle()?.copyWith(fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight)
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color,
fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight)
: TextStyle( : TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: color: widget.color ?? const Color(0xff000000),
widget.color ?? const Color(0xff000000),
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ?? letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
(widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins', fontFamily: widget.fontFamily ?? 'Poppins',
decoration: widget.textDecoration, decoration: widget.textDecoration,
@ -195,32 +173,22 @@ class _AppTextState extends State<AppText> {
); );
} else { } else {
return Text( return Text(
!hidden !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)),
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign, textAlign: widget.textAlign,
overflow: widget.maxLines != null overflow: widget.maxLines != null ? ((widget.maxLines! > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null,
? ((widget.maxLines > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
maxLines: widget.maxLines, maxLines: widget.maxLines,
style: widget.style != null style: widget.style != null
? _getFontStyle().copyWith( ? _getFontStyle()?.copyWith(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color, color: widget.color,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight) height: widget.fontHeight,
)
: TextStyle( : TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color ?? Colors.black, color: widget.color ?? Colors.black,
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ?? letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
(widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins', fontFamily: widget.fontFamily ?? 'Poppins',
decoration: widget.textDecoration, decoration: widget.textDecoration,
@ -229,30 +197,30 @@ class _AppTextState extends State<AppText> {
} }
} }
TextStyle _getFontStyle() { TextStyle? _getFontStyle() {
switch (widget.style) { switch (widget.style) {
case "headline2": case "headline2":
return Theme.of(context).textTheme.headline2; return Theme.of(context).textTheme.displayMedium;
case "headline3": case "headline3":
return Theme.of(context).textTheme.headline3; return Theme.of(context).textTheme.displaySmall;
case "headline4": case "headline4":
return Theme.of(context).textTheme.headline4; return Theme.of(context).textTheme.headlineMedium;
case "headline5": case "headline5":
return Theme.of(context).textTheme.headline5; return Theme.of(context).textTheme.headlineSmall;
case "headline6": case "headline6":
return Theme.of(context).textTheme.headline6; return Theme.of(context).textTheme.titleLarge;
case "bodyText2": case "bodyText2":
return Theme.of(context).textTheme.bodyText2; return Theme.of(context).textTheme.bodyMedium;
case "bodyText_15": case "bodyText_15":
return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); return Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 15.0);
case "bodyText1": case "bodyText1":
return Theme.of(context).textTheme.bodyText1; return Theme.of(context).textTheme.bodyLarge;
case "caption": case "caption":
return Theme.of(context).textTheme.caption; return Theme.of(context).textTheme.bodySmall;
case "overline": case "overline":
return Theme.of(context).textTheme.overline; return Theme.of(context).textTheme.labelSmall;
case "button": case "button":
return Theme.of(context).textTheme.button; return Theme.of(context).textTheme.labelLarge;
default: default:
return const TextStyle(); return const TextStyle();
} }
@ -291,11 +259,11 @@ class _AppTextState extends State<AppText> {
case "date": case "date":
return 24.0; return 24.0;
default: default:
return SizeConfig.textMultiplier * 2.8; return SizeConfig.textMultiplier! * 2.8;
} }
} }
FontWeight _getFontWeight() { FontWeight? _getFontWeight() {
if (widget.bold ?? false) { if (widget.bold ?? false) {
return FontWeight.w900; return FontWeight.w900;
} else if (widget.regular ?? false) { } else if (widget.regular ?? false) {

@ -1,43 +1,36 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; // import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; // import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
//
// class ErrorMessage extends StatelessWidget {
class ErrorMessage extends StatelessWidget { // const ErrorMessage({Key? key, this.error = ''}) : super(key: key);
const ErrorMessage({ //
Key key, // final String error;
@required this.error, //
}) : super(key: key); // @override
// Widget build(BuildContext context) {
final String error; // return SingleChildScrollView(
// child: Center(
@override // child: Column(
Widget build(BuildContext context) { // crossAxisAlignment: CrossAxisAlignment.center,
return SingleChildScrollView( // children: [
child: Center( // const SizedBox(height: 100),
child: Column( // SvgPicture.asset('assets/images/svgs/no data.svg'),
crossAxisAlignment: CrossAxisAlignment.center, // Center(
children: [ // child: Center(
SizedBox( // child: Padding(
height: 100, // padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30),
), // child: Center(
SvgPicture.asset('assets/images/svgs/no data.svg'), // child: AppText(
Center( // error ?? '',
child: Center( // textAlign: TextAlign.center,
child: Padding( // )),
padding: const EdgeInsets.only( // ),
top: 12, bottom: 12, right: 20, left: 30), // ),
child: Center( // )
child: AppText( // ],
error ?? '', // ),
textAlign: TextAlign.center, // ),
)), // );
), // }
), // }
)
],
),
),
);
}
}

@ -1,43 +1,43 @@
import 'package:flutter/cupertino.dart'; // import 'package:flutter/cupertino.dart';
import 'package:flutter_gifimage/flutter_gifimage.dart'; // import 'package:flutter_gifimage/flutter_gifimage.dart';
//
class GifLoaderContainer extends StatefulWidget { // class GifLoaderContainer extends StatefulWidget {
@override // @override
_GifLoaderContainerState createState() => _GifLoaderContainerState(); // _GifLoaderContainerState createState() => _GifLoaderContainerState();
} // }
//
class _GifLoaderContainerState extends State<GifLoaderContainer> // class _GifLoaderContainerState extends State<GifLoaderContainer>
with TickerProviderStateMixin { // with TickerProviderStateMixin {
GifController controller1; // GifController controller1;
//
@override // @override
void initState() { // void initState() {
controller1 = GifController(vsync: this); // controller1 = GifController(vsync: this);
//
WidgetsBinding.instance.addPostFrameCallback((_) { // WidgetsBinding.instance.addPostFrameCallback((_) {
controller1.repeat( // controller1.repeat(
min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); // min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true);
}); // });
super.initState(); // super.initState();
} // }
//
@override // @override
void dispose() { // void dispose() {
controller1.dispose(); // controller1.dispose();
super.dispose(); // super.dispose();
} // }
//
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
return Center( // return Center(
//progress-loading.gif // //progress-loading.gif
child: Container( // child: Container(
// margin: EdgeInsets.only(bottom: 40), // // margin: EdgeInsets.only(bottom: 40),
child: GifImage( // child: GifImage(
controller: controller1, // controller: controller1,
image: AssetImage( // image: AssetImage(
"assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), // "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
), // ),
)); // ));
} // }
} // }

@ -1,11 +1,11 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'gif_loader_container.dart'; // import 'gif_loader_container.dart';
class GifLoaderDialogUtils { // class GifLoaderDialogUtils {
static showMyDialog(BuildContext context) { // static showMyDialog(BuildContext context) {
showDialog(context: context, builder: (ctx) => GifLoaderContainer()); // showDialog(context: context, builder: (ctx) => GifLoaderContainer());
} // }
//
static hideDialog(BuildContext context) { // static hideDialog(BuildContext context) {
if (Navigator.canPop(context)) Navigator.of(context).pop(); // if (Navigator.canPop(context)) Navigator.of(context).pop();
} // }
} // }

@ -13,10 +13,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: audio_session name: audio_session
sha256: e4acc4e9eaa32436dfc5d7aed7f0a370f2d7bb27ee27de30d6c4f220c2a05c73 sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.13" version: "0.1.16"
blinking_text: blinking_text:
dependency: "direct main" dependency: "direct main"
description: description:
@ -41,14 +41,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.1" version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
url: "https://pub.dev"
source: hosted
version: "1.3.1"
clock: clock:
dependency: transitive dependency: transitive
description: description:
@ -101,18 +93,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: crypto name: crypto
sha256: cf75650c66c0316274e21d7c43d3dea246273af5955bd94e8184837cd577575c sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.3"
equatable: equatable:
dependency: transitive dependency: transitive
description: description:
name: equatable name: equatable
sha256: c6094fd1efad3046334a9c40bee022147e55c25401ccd89b94e373e3edadd375 sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "2.0.5"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -125,18 +117,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: ffi name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
url: "https://pub.dev"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.4" version: "2.0.2"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -162,10 +146,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_svg name: flutter_svg
sha256: c9bb2757b8a0bbf8e45f4069a90d2b9dbafc80b1a5e28d43e29088be533e6df4 sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.3" version: "1.1.6"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -175,10 +159,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_tts name: flutter_tts
sha256: e91ad17793ad12cca9c3066accf99ceb353bf0355ad06b767176f178b5c428f6 sha256: "23d47e1335c632228b80d9693e2494a834393fff5893b66e8ae494dcce4e9867"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.6.3" version: "3.8.3"
flutter_web_plugins: flutter_web_plugins:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -188,26 +172,26 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: get_it name: get_it
sha256: "290fde3a86072e4b37dbb03c07bec6126f0ecc28dad403c12ffe2e5a2d751ab7" sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.2.0" version: "7.6.0"
http: http:
dependency: "direct main" dependency: "direct main"
description: description:
name: http name: http
sha256: "2ed163531e071c2c6b7c659635112f24cb64ecbebf6af46b550d536c0b1aa112" sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.13.4" version: "0.13.6"
http_parser: http_parser:
dependency: transitive dependency: transitive
description: description:
name: http_parser name: http_parser
sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.0" version: "4.0.2"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -220,26 +204,26 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: just_audio name: just_audio
sha256: "7a5057a4d05c8f88ee968cec6fdfe1015577d5184e591d5ac15ab16d8f5ecb17" sha256: "5ed0cd723e17dfd8cd4b0253726221e67f6546841ea4553635cf895061fc335b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.31" version: "0.9.35"
just_audio_platform_interface: just_audio_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: just_audio_platform_interface name: just_audio_platform_interface
sha256: eff112d5138bea3ba544b6338b1e0537a32b5e1425e4d0dc38f732771cda7c84 sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.2.0" version: "4.2.1"
just_audio_web: just_audio_web:
dependency: transitive dependency: transitive
description: description:
name: just_audio_web name: just_audio_web
sha256: "89d8db6f19f3821bb6bf908c4bfb846079afb2ab575b783d781a6bf119e3abaf" sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.4.7" version: "0.4.8"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -252,10 +236,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: logging name: logging
sha256: "293ae2d49fd79d4c04944c3a26dfd313382d5f52e821ec57119230ae16031ad4" sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.2.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -300,114 +284,98 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path_drawing name: path_drawing
sha256: a19347362f85a45aadf6bdfa3c04f18ff6676c445375eecd6251f9e09b9db551 sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "1.0.1"
path_parsing: path_parsing:
dependency: transitive dependency: transitive
description: description:
name: path_parsing name: path_parsing
sha256: "9508ebdf1c3ac3a68ad5fb15edab8b026382999f18f77352349e56fbd74183ac" sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "1.0.1"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
name: path_provider name: path_provider
sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.13" version: "2.1.1"
path_provider_android: path_provider_android:
dependency: transitive dependency: transitive
description: description:
name: path_provider_android name: path_provider_android
sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.24" version: "2.2.0"
path_provider_foundation: path_provider_foundation:
dependency: transitive dependency: transitive
description: description:
name: path_provider_foundation name: path_provider_foundation
sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e" sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.3" version: "2.3.1"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
name: path_provider_linux name: path_provider_linux
sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.10" version: "2.2.1"
path_provider_platform_interface: path_provider_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: path_provider_platform_interface name: path_provider_platform_interface
sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.6" version: "2.1.1"
path_provider_windows: path_provider_windows:
dependency: transitive dependency: transitive
description: description:
name: path_provider_windows name: path_provider_windows
sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.5" version: "2.2.1"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
name: petitparser name: petitparser
sha256: "1a914995d4ef10c94ff183528c120d35ed43b5eaa8713fc6766a9be4570782e2" sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.4.0" version: "5.1.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.2"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757" sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.6"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description:
name: provider name: provider
sha256: "7896193cf752c40ba7f7732a95264319a787871e5d628225357f5c909182bc06" sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.2" version: "6.0.5"
quiver:
dependency: transitive
description:
name: quiver
sha256: "616b691d1c8f5c53b7b39ce3542f6a25308d7900bf689d0210e72a644a10387e"
url: "https://pub.dev"
source: hosted
version: "3.0.1+1"
rxdart: rxdart:
dependency: transitive dependency: transitive
description: description:
@ -437,6 +405,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.9.1"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sse_client: sse_client:
dependency: transitive dependency: transitive
description: description:
@ -489,26 +465,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: tuple name: tuple
sha256: fe3ae4f0dca3f9aac0888e2e0d117b642ce283a82d7017b54136290c0a3b0dd3 sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.0" version: "2.0.2"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
name: typed_data name: typed_data
sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.3.2"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
name: uuid name: uuid
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" sha256: e03928880bdbcbf496fb415573f5ab7b1ea99b9b04f669c01104d085893c3134
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.7" version: "4.0.0"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -561,34 +537,34 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web_socket_channel name: web_socket_channel
sha256: "0c2ada1b1aeb2ad031ca81872add6be049b8cb479262c6ad3c4b0f9c24eaab2f" sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "2.4.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.3" version: "3.1.4"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
name: xdg_directories name: xdg_directories
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "1.0.3"
xml: xml:
dependency: transitive dependency: transitive
description: description:
name: xml name: xml
sha256: baa23bcba1ba4ce4b22c0c7a1d9c861e7015cb5169512676da0b85138e72840c sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.3.1" version: "6.2.2"
sdks: sdks:
dart: ">=2.18.0 <3.0.0" dart: ">=2.19.0 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.7.0"

@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 4.3.5+1 version: 4.3.5+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions

Loading…
Cancel
Save