diff --git a/assets/pngs/emergency.png b/assets/pngs/emergency.png new file mode 100644 index 0000000..5a12015 Binary files /dev/null and b/assets/pngs/emergency.png differ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e6a0ac0..0f8d01a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,6 +3,8 @@ PODS: - Flutter - MTBBarcodeScanner - SwiftProtobuf + - device_info (0.0.1): + - Flutter - easy_app_installer (0.0.1): - Flutter - Flutter (1.0.0) @@ -12,6 +14,8 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) + - location (0.0.1): + - Flutter - modal_progress_hud_nsn (0.0.1): - Flutter - MTBBarcodeScanner (5.0.11) @@ -22,6 +26,8 @@ PODS: - FlutterMacOS - permission_handler_apple (9.0.4): - Flutter + - platform_device_id (0.0.1): + - Flutter - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS @@ -33,13 +39,16 @@ PODS: DEPENDENCIES: - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) + - device_info (from `.symlinks/plugins/device_info/ios`) - easy_app_installer (from `.symlinks/plugins/easy_app_installer/ios`) - Flutter (from `Flutter`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - location (from `.symlinks/plugins/location/ios`) - modal_progress_hud_nsn (from `.symlinks/plugins/modal_progress_hud_nsn/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - platform_device_id (from `.symlinks/plugins/platform_device_id/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) @@ -53,12 +62,16 @@ SPEC REPOS: EXTERNAL SOURCES: barcode_scan2: :path: ".symlinks/plugins/barcode_scan2/ios" + device_info: + :path: ".symlinks/plugins/device_info/ios" easy_app_installer: :path: ".symlinks/plugins/easy_app_installer/ios" Flutter: :path: Flutter fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" + location: + :path: ".symlinks/plugins/location/ios" modal_progress_hud_nsn: :path: ".symlinks/plugins/modal_progress_hud_nsn/ios" package_info_plus: @@ -67,6 +80,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/ios" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" + platform_device_id: + :path: ".symlinks/plugins/platform_device_id/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/ios" sqflite: @@ -74,16 +89,19 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 + device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 easy_app_installer: 29abe397da7d86721fee853281202f414373f45c Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740 modal_progress_hud_nsn: f6fb744cd060653d66ed8f325360ef3650eb2fde MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852 + path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce - shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca + platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 + shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 SwiftProtobuf: b02b5075dcf60c9f5f403000b3b0c202a11b6ae1 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 097b297..3559a67 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -47,5 +47,14 @@ UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + Need location when in use + NSLocationAlwaysAndWhenInUseUsageDescription + Always and when in use! + NSLocationUsageDescription + Older devices need location. + NSLocationAlwaysUsageDescription + Can I have location always? diff --git a/lib/bloc/sos/sos_bloc.dart b/lib/bloc/sos/sos_bloc.dart new file mode 100644 index 0000000..beb2c0f --- /dev/null +++ b/lib/bloc/sos/sos_bloc.dart @@ -0,0 +1,106 @@ +import 'package:bloc/bloc.dart'; +import 'package:equatable/equatable.dart'; +import 'package:flutter/foundation.dart'; +import 'package:location/location.dart'; +import 'package:unit2/model/sos/session.dart'; +import 'package:unit2/sevices/sos/sos_service.dart'; + +import '../../utils/global.dart'; + +part 'sos_event.dart'; +part 'sos_state.dart'; + +class SosBloc extends Bloc { + SosBloc() : super(SosInitial()) { + LocationData? locationData; + String? mobile1; + String? mobile2; + String? sessionToken; + ////get user location + on((event, emit) async { + emit(const LoadingState(message: "Getting Location")); + mobile1 = await SOS!.get('mobile1'); + mobile2 = await SOS!.get('mobile2'); + sessionToken = await SOS!.get('session_token'); + if (mobile1 != null) { + if (sessionToken != null) { + add(CheckAcknowledgement(sessionToken: sessionToken!)); + } else { + try { + LocationData? newLocationData = + await SosService.instance.getUserLocation(); + locationData = newLocationData; + + emit(RequestSosState( + locationData: locationData!, + mobile1: mobile1!, + mobile2: mobile2)); + } catch (e) { + emit(ErrorState(message: e.toString())); + } + } + } else { + try { + LocationData? newLocationData = + await SosService.instance.getUserLocation(); + locationData = newLocationData; + + emit(UserLocationLoaded(locationData: locationData!)); + } catch (e) { + emit(ErrorState(message: e.toString())); + } + } + }); + ////submit mobile + on((event, emit) async { + emit(const LoadingState(message: "")); + mobile1 = event.mobile1; + mobile2 = event.mobile2; + await SOS!.put('mobile1', event.mobile1); + await SOS!.put('mobile2', event.mobile2); + emit(RequestSosState( + locationData: locationData!, + mobile1: event.mobile1, + mobile2: event.mobile2)); + }); + + //// send SOS + on((event, emit) async { + SessionData sessionData; + emit(const LoadingState(message: "Sending emergency response request")); + try { + sessionData = await SosService.instance.requestSos( + location: locationData!, + mobile1: mobile1!, + mobile2: mobile2, + msg: event.msg, + requestedDate: event.requestDate); + await SOS!.put('session_token', sessionData.sessionToken); + emit(SOSReceivedState(sessionToken: sessionData.sessionToken!)); + } catch (e) { + emit(ErrorState(message: e.toString())); + } + }); + //// check acknowledgement + on((event, emit) async { + SessionData sessionData; + try { + SessionData? newSessionData = + await SosService.instance.checkAcknowledgement(event.sessionToken); + if (newSessionData.acknowledgeDate == null) { + debugPrint(newSessionData.sessionToken); + emit(SOSReceivedState(sessionToken: newSessionData.sessionToken!)); + } else { + sessionData = newSessionData; + emit(SoSAcknowledgementConfirm(sessionData: sessionData)); + } + } catch (e) { + emit(ErrorState(message: e.toString())); + } + }); + on((event, emit) async { + await SOS!.delete('session_token'); + add(LoadUserLocation()); + }); + } +} diff --git a/lib/bloc/sos/sos_event.dart b/lib/bloc/sos/sos_event.dart new file mode 100644 index 0000000..db341cd --- /dev/null +++ b/lib/bloc/sos/sos_event.dart @@ -0,0 +1,43 @@ +part of 'sos_bloc.dart'; + +abstract class SosEvent extends Equatable { + const SosEvent(); + + @override + List get props => []; +} + +class LoadUserLocation extends SosEvent { + @override + List get props => []; +} + +class SubmitMobile extends SosEvent { + final String mobile1; + final String? mobile2; + const + SubmitMobile({required this.mobile1,required this.mobile2}); + @override + List get props => []; + +} + +class SendSOS extends SosEvent { + final String msg; + final String requestDate; + const SendSOS({required this.msg, required this.requestDate}); + @override + List get props => [msg, requestDate]; +} + +class CheckAcknowledgement extends SosEvent { + final String sessionToken; + const CheckAcknowledgement({required this.sessionToken}); + @override + List get props => [sessionToken]; +} + +class OnDoneRequest extends SosEvent { + @override + List get props => []; +} \ No newline at end of file diff --git a/lib/bloc/sos/sos_state.dart b/lib/bloc/sos/sos_state.dart new file mode 100644 index 0000000..44ca7a8 --- /dev/null +++ b/lib/bloc/sos/sos_state.dart @@ -0,0 +1,50 @@ +part of 'sos_bloc.dart'; + +abstract class SosState extends Equatable { + const SosState(); + + @override + List get props => []; +} + +class SosInitial extends SosState {} + +class UserLocationLoaded extends SosState { + final LocationData locationData; + const UserLocationLoaded({required this.locationData}); + @override + List get props => [locationData]; +} +class ErrorState extends SosState{ + final String message; + const ErrorState({required this.message}); + @override + List get props => [message]; +} +class RequestSosState extends SosState{ + final LocationData locationData; + final String mobile1; + final String? mobile2; + + const RequestSosState({required this.locationData, required this.mobile1, required this.mobile2}); + @override + List get props => [locationData,mobile1]; +} + +class LoadingState extends SosState{ + final String message; + const LoadingState({required this.message}); +} +class SOSReceivedState extends SosState { + final String sessionToken; + const SOSReceivedState({required this.sessionToken}); + @override + List get props => [sessionToken]; +} + +class SoSAcknowledgementConfirm extends SosState{ + final SessionData sessionData; + const SoSAcknowledgementConfirm({required this.sessionData}); + @override + List get props => [sessionData]; +} diff --git a/lib/bloc/user/user_bloc.dart b/lib/bloc/user/user_bloc.dart index 5c9c705..3bec84b 100644 --- a/lib/bloc/user/user_bloc.dart +++ b/lib/bloc/user/user_bloc.dart @@ -22,26 +22,31 @@ class UserBloc extends Bloc { String? _apkVersion; bool save = false; UserBloc() : super(UserInitial()) { - // this event is called when opening the app to check if - // there is new app version + //// this event is called when opening the app to check if + //// there is new app version on((event, emit) async { try { emit(SplashScreen()); - VersionInfo versionInfo = await AuthService.instance.getVersionInfo(); - _versionInfo = versionInfo; + if (_versionInfo == null) { + VersionInfo versionInfo = await AuthService.instance.getVersionInfo(); + _versionInfo = versionInfo; + } String apkVersion = await getAppVersion(); _apkVersion = apkVersion; final String? saved = CREDENTIALS?.get('saved'); final String? username = CREDENTIALS?.get('username'); final String? password = CREDENTIALS?.get('password'); debugPrint(username); - debugPrint(password); + debugPrint(password); if (saved != null) { save = true; add(UserLogin(username: username, password: password)); } else { emit(VersionLoaded( - versionInfo: _versionInfo, apkVersion: _apkVersion)); + versionInfo: _versionInfo, + apkVersion: _apkVersion, + username: null, + password: null)); } } catch (e) { emit(UserError( @@ -49,11 +54,15 @@ class UserBloc extends Bloc { )); } }); -//Loading the current version of the app +////Loading the current version of the app on((event, emit) { - emit(VersionLoaded(versionInfo: _versionInfo, apkVersion: _apkVersion)); + emit(VersionLoaded( + versionInfo: _versionInfo, + apkVersion: _apkVersion, + username: event.username, + password: event.password)); }); - +////userlogin on((event, emit) async { try { Map response = await AuthService.instance @@ -61,10 +70,16 @@ class UserBloc extends Bloc { if (response['status'] == true) { UserData userData = UserData.fromJson(response['data']); emit(UserLoggedIn( - userData: userData, success: true, message: response['message'],savedCredentials: save)); + userData: userData, + success: true, + message: response['message'], + savedCredentials: save)); } else { emit(UserLoggedIn( - userData: null, success: false, message: response['message'],savedCredentials: save)); + userData: null, + success: false, + message: response['message'], + savedCredentials: save)); } } on TimeoutException catch (_) { emit(InternetTimeout(message: timeoutError)); @@ -77,7 +92,7 @@ class UserBloc extends Bloc { UserData? userData = await AuthService.instance .qrLogin(uuid: event.uuid, password: event.password); _userData = userData; - emit(UserLoggedIn(userData: _userData,savedCredentials: save)); + emit(UserLoggedIn(userData: _userData, savedCredentials: save)); } on TimeoutException catch (_) { emit(InternetTimeout(message: timeoutError)); } on SocketException catch (_) { @@ -87,7 +102,7 @@ class UserBloc extends Bloc { } }); on((event, emit) { - emit(UserLoggedIn(userData: _userData,savedCredentials: save)); + emit(UserLoggedIn(userData: _userData, savedCredentials: save)); }); on((event, emit) async { ScanResult result = await QRCodeBarCodeScanner.instance.scanner(); diff --git a/lib/bloc/user/user_event.dart b/lib/bloc/user/user_event.dart index cf529fb..a0cbd10 100644 --- a/lib/bloc/user/user_event.dart +++ b/lib/bloc/user/user_event.dart @@ -28,7 +28,11 @@ class GetUuid extends UserEvent { } -class LoadVersion extends UserEvent {} +class LoadVersion extends UserEvent { + final String? username; + final String? password; + LoadVersion({this.password,this.username}); +} class UuidLogin extends UserEvent { final String? uuid; diff --git a/lib/bloc/user/user_state.dart b/lib/bloc/user/user_state.dart index de6688f..ab21f7f 100644 --- a/lib/bloc/user/user_state.dart +++ b/lib/bloc/user/user_state.dart @@ -42,7 +42,9 @@ class UserLoggedIn extends UserState{ class VersionLoaded extends UserState { final VersionInfo? versionInfo; final String? apkVersion; - VersionLoaded({this.versionInfo,this.apkVersion}); + final String? username; + final String? password; + VersionLoaded({this.versionInfo,this.apkVersion, this.password,this.username}); @override List get props => [versionInfo!]; } diff --git a/lib/main.dart b/lib/main.dart index da7df5a..20b079b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,7 +20,7 @@ Future main() async { var appDirectory = await path_provider.getApplicationDocumentsDirectory(); await Hive.initFlutter(appDirectory.path); CREDENTIALS = await Hive.openBox('credentials'); - SOSCONTACTS = await Hive.openBox('soscontacts'); + SOS = await Hive.openBox('soscontacts'); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) .then((_) { runApp(MyApp()); diff --git a/lib/model/sos/session.dart b/lib/model/sos/session.dart new file mode 100644 index 0000000..2fa398a --- /dev/null +++ b/lib/model/sos/session.dart @@ -0,0 +1,69 @@ +// To parse this JSON data, do +// +// final sessionData = sessionDataFromJson(jsonString); + +import 'dart:convert'; + +SessionData sessionDataFromJson(String str) => SessionData.fromJson(json.decode(str)); + +String sessionDataToJson(SessionData data) => json.encode(data.toJson()); + +class SessionData { + SessionData({ + this.id, + this.receivedDate, + this.responseDate, + this.statusid, + this.acknowledgeDate, + this.acknowledgedBy, + this.remarks, + this.respondentid, + this.respondentMessage, + this.pushedbuttonDate, + this.sosLevel, + this.sessionToken, + }); + + final int? id; + final String? receivedDate; + final String? responseDate; + final int? statusid; + final String? acknowledgeDate; + final String? acknowledgedBy; + final String? remarks; + final int? respondentid; + final String? respondentMessage; + final String? pushedbuttonDate; + final String? sosLevel; + final String? sessionToken; + + factory SessionData.fromJson(Map json) => SessionData( + id: json["id"] = json["id"], + receivedDate: json["received_date"], + responseDate: json["response_date"], + statusid: json["statusid"], + acknowledgeDate: json["acknowledge_date"], + acknowledgedBy: json["acknowledged_by"], + remarks: json["remarks"], + respondentid: json["respondentid"], + respondentMessage: json["respondent_message"], + pushedbuttonDate: json["pushedbutton_date"], + sosLevel: json["sos_level"], + sessionToken: json["session_token"], + ); + + Map toJson() => { + "id": id, + "received_date": receivedDate, + "response_date": responseDate, + "statusid": statusid, + "acknowledge_date": acknowledgeDate, + "acknowledged_by": acknowledgedBy, + "remarks": remarks, + "respondentid": respondentid, + "respondent_message": respondentMessage, + "pushedbutton_date": pushedbuttonDate , + "sos_level": sosLevel, + "session_token": sessionToken, + }; +} diff --git a/lib/screens/sos/add_mobile.dart b/lib/screens/sos/add_mobile.dart index 8abe496..51aa7e9 100644 --- a/lib/screens/sos/add_mobile.dart +++ b/lib/screens/sos/add_mobile.dart @@ -82,7 +82,7 @@ class AddMobile extends StatelessWidget { validator: mobileNumberValidator, maxLength: 11, decoration: - normalTextFieldStyle(mobile1, "+63")), + normalTextFieldStyle(mobile1, "09000000000")), const SizedBox( height: 12, ), @@ -90,7 +90,7 @@ class AddMobile extends StatelessWidget { name: 'mobile2', maxLength: 11, decoration: - normalTextFieldStyle(mobile2, "+63")), + normalTextFieldStyle(mobile2, "0900000000000")), SizedBox( height: isMobile() diff --git a/lib/screens/sos/components/acknnowledge.dart b/lib/screens/sos/components/acknnowledge.dart new file mode 100644 index 0000000..8a771ba --- /dev/null +++ b/lib/screens/sos/components/acknnowledge.dart @@ -0,0 +1,123 @@ +import 'package:animate_do/animate_do.dart'; +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttericon/iconic_icons.dart'; +import 'package:unit2/theme-data.dart/btn-style.dart'; + +import '../../../model/sos/session.dart'; +import '../../../theme-data.dart/colors.dart'; +import '../../../utils/global.dart'; + +class SosAcknowledged extends StatelessWidget { + final Function() onpressed; + final SessionData sessionData; + const SosAcknowledged({super.key, required this.onpressed, required this.sessionData}); + + @override + Widget build(BuildContext context) { + + return Container( + padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 35), + height: screenHeight, + child: Stack( + children: [ + Positioned( + bottom: 0, + child: SizedBox( + width: screenWidth, + height: screenHeight / 2, + child: Opacity( + opacity: .2, + child: Image.asset( + "assets/pngs/emergency.png", + fit: BoxFit.cover, + ), + ), + )), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox( + height: 18, + ), + SlideInDown( + child: AutoSizeText( + "SOS Acknowledged!", + maxLines: 2, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.displayMedium!.copyWith( + fontSize: 40, + color: success2, + fontWeight: FontWeight.w600), + ), + ), + const SizedBox( + height: 5, + ), + SlideInDown( + child: const Icon( + Iconic.ok_circle, + color: success2, + size: 120, + ), + ), + const SizedBox( + height: 22, + ), + SlideInUp( + child: Container( + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(15))), + child: Column( + children: [ + + + ListTile( + title: AutoSizeText( + sessionData.acknowledgedBy!.toUpperCase(), + maxLines: 2, + style: Theme.of(context).textTheme.headline4!.copyWith( + fontSize: 22, + fontWeight: FontWeight.bold, + color: third), + ), + subtitle: Text( + "Acknowledge by", + style: Theme.of(context).textTheme.labelLarge, + ), + ), + Container( + padding: const EdgeInsets.all(15), + child: Text( + "NOTE: Please ensure that the mobile numbers you provided are still active, and look for an area with stable network. The response team will contact your mobile number.", + textAlign: TextAlign.justify, + style: Theme.of(context).textTheme.caption!.copyWith( + fontSize: 14, + color: Colors.black87, + ), + ), + ), + ], + ), + ), + ), + Expanded(child: Container()), + SlideInUp( + child: SizedBox( + height: 50, + width: double.infinity, + child: ElevatedButton( + style: + mainBtnStyle(second, Colors.transparent, Colors.white54), + onPressed: onpressed, + child: const Text("DONE!")), + ), + ) + ], + ), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/sos/components/add_mobile.dart b/lib/screens/sos/components/add_mobile.dart new file mode 100644 index 0000000..3025e92 --- /dev/null +++ b/lib/screens/sos/components/add_mobile.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:unit2/bloc/sos/sos_bloc.dart'; +import 'package:unit2/screens/sos/components/request_sos.dart'; +import 'package:unit2/theme-data.dart/text-styles.dart'; +import 'package:unit2/utils/screen_info.dart'; +import '../../../theme-data.dart/btn-style.dart'; +import '../../../theme-data.dart/colors.dart'; +import '../../../theme-data.dart/form-style.dart'; +import '../../../utils/global.dart'; +import '../../../utils/text_container.dart'; +import '../../../utils/validators.dart'; +import '../../../widgets/wave.dart'; + +class AddMobile extends StatelessWidget { + AddMobile({super.key}); + final _formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + + return BlocBuilder( + builder: (context, state) { + if(state is UserLocationLoaded){ + return SingleChildScrollView( + child: SizedBox( + height: screenHeight * .95, + child: Stack( + children: [ + + Positioned( + bottom: 0, + right: 0, + child: WaveReverse(height: blockSizeVertical * 8)), + Container( + height: screenHeight, + padding: isMobile() + ? const EdgeInsets.symmetric(horizontal: 24) + : const EdgeInsets.symmetric(horizontal: 60), + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: isMobile() + ? screenHeight * .12 + : screenHeight * .20), + SvgPicture.asset( + 'assets/svgs/add_mobile.svg', + height: isMobile() + ? blockSizeVertical * 22 + : blockSizeVertical * 30, + allowDrawingOutsideViewBox: true, + ), + const SizedBox( + height: 24, + ), + Text(addMobile, style: titleTextStyle()), + const SizedBox( + height: 8, + ), + Text(addMobileCaption, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.caption), + const SizedBox( + height: 24, + ), + FormBuilder( + key: _formKey, + child: Column( + children: [ + //// Mobile number 1 + FormBuilderTextField( + autovalidateMode: AutovalidateMode.onUserInteraction, + name: 'mobile1', + validator: mobileNumberValidator, + maxLength: 11, + decoration: + normalTextFieldStyle(mobile1, "09")), + const SizedBox( + height: 12, + ), + //// Mobile number 2 + FormBuilderTextField( + autovalidateMode: AutovalidateMode.onUserInteraction, + name: 'mobile2', + + decoration: + normalTextFieldStyle(mobile2, "09")), + + SizedBox( + height: isMobile() + ? blockSizeVertical * 3 + : blockSizeHorizontal * 5), + SizedBox( + width: double.infinity, + height: screenHeight * .06, + child: ElevatedButton( + style: secondaryBtnStyle(primary, + Colors.transparent, Colors.white54), + child: const Text( + submit, + style: TextStyle(color: Colors.white), + ),//// on pressed + onPressed: () { + if (_formKey.currentState! + .saveAndValidate()) { + String mobile1 = _formKey.currentState!.value['mobile1']; + String? mobile2 = _formKey.currentState!.value['mobile2']; + context.read().add(SubmitMobile(mobile1: mobile1, mobile2: mobile2)); + } + + // } + }, + ), + ), + ], + )) + ]), + ), + ], + ), + ), + ); + } + return Container(); + + }, + ); + } +} diff --git a/lib/screens/sos/components/edit_mobile.dart b/lib/screens/sos/components/edit_mobile.dart new file mode 100644 index 0000000..8270841 --- /dev/null +++ b/lib/screens/sos/components/edit_mobile.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:unit2/main.dart'; +import 'package:unit2/theme-data.dart/btn-style.dart'; +import 'package:unit2/utils/validators.dart'; + +import '../../../theme-data.dart/colors.dart'; +import '../../../theme-data.dart/form-style.dart'; + +class EditMobile extends StatelessWidget { + final String initialValue; + final String title; + final String label; + final Function() onpressed; + final Function(String?) onchanged; + const EditMobile( + {super.key, + required this.initialValue, + required this.label, + required this.title, + required this.onpressed, + required this.onchanged}); + + + @override + + Widget build(BuildContext context) { + final formKey = GlobalKey(); + return Container( + height: 300, + padding: const EdgeInsets.all(26), + child: Stack( + children: [ + Positioned( + top: -16, + right: -10, + child: IconButton( + onPressed: () { + Navigator.of(context, rootNavigator: true).pop(); + }, + icon: const Icon( + Icons.close, + size: 18, + )), + ), + FormBuilder( + key: formKey, + child: Column( + children: [ + Text(title), + const SizedBox( + height: 25, + ), + FormBuilderTextField( + autovalidateMode: AutovalidateMode.onUserInteraction, + name: "mobile", + onChanged: onchanged, + validator: mobileNumberValidator, + keyboardType: TextInputType.number, + initialValue: initialValue, + decoration: normalTextFieldStyle(label, label), + maxLength: 11, + ), + const SizedBox( + height: 25, + ), + SizedBox( + height: 50, + width: 200, + child: ElevatedButton( + onPressed: (){ + if(formKey.currentState!.saveAndValidate()){ + onpressed(); + } + }, + style: mainBtnStyle(success2, Colors.transparent, success), + child: const Text("Submit")), + ) + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/screens/sos/components/request_sos.dart b/lib/screens/sos/components/request_sos.dart new file mode 100644 index 0000000..990de3e --- /dev/null +++ b/lib/screens/sos/components/request_sos.dart @@ -0,0 +1,168 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/src/widgets/container.dart'; +import 'package:flutter/src/widgets/framework.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:fluttericon/font_awesome5_icons.dart'; +import 'package:fluttericon/typicons_icons.dart'; +import 'package:form_builder_validators/form_builder_validators.dart'; +import 'package:intl/intl.dart'; +import 'package:unit2/bloc/sos/sos_bloc.dart'; +import 'package:unit2/screens/sos/components/mobile.dart'; +import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; + +import '../../../sevices/sos/sos_service.dart'; +import '../../../theme-data.dart/btn-style.dart'; +import '../../../theme-data.dart/form-style.dart'; +import '../../../utils/global.dart'; +import 'edit_mobile.dart'; + +class RequestSOS extends StatefulWidget { + const RequestSOS({super.key}); + + @override + State createState() => _RequestSOSState(); +} + +class _RequestSOSState extends State { + final formKey = GlobalKey(); + DateFormat dteFormat = DateFormat("y-M-d H:m:s"); + + String? mobileNumber1; + String? mobileNumber2; + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + if(state is RequestSosState){ + return SingleChildScrollView( + child: Container( + height: screenHeight * .82, + padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 10), + child: FormBuilder( + key: formKey, + child: Column( + children: [ + SizedBox( + height: blockSizeVertical * 2, + ), + SvgPicture.asset( + 'assets/svgs/request_sos.svg', + height: blockSizeVertical * 22, + allowDrawingOutsideViewBox: true, + ), + Mobile( + title: state.mobile1, + subtitle: mobile1, + //// edit modal + onPressed: () { + showBottomSheet( + context: context, + builder: (context) { + return EditMobile( + title: "Edit Mobile 1", + label: "Mobile number 1", + initialValue: state.mobile1, + onchanged: (value) { + mobileNumber1 = value; + }, + onpressed: () { + Navigator.of(context, + rootNavigator: true) + .pop(); + BlocProvider.of(context) + .add(SubmitMobile( + mobile1: mobileNumber1!, + mobile2: state.mobile2)); + }, + ); + }); + },), + const Divider(), + ////edit mobile 2 + Mobile( + title: state.mobile2??"N/A", + subtitle: mobile2, + onPressed: () { + showBottomSheet( + context: context, + builder: (context) { + return EditMobile( + title: "Edit Mobile 2", + label: "Mobile number 2", + initialValue: state.mobile2??'', + onchanged: (value) { + mobileNumber2 = value; + }, + onpressed: () { + Navigator.of(context, + rootNavigator: true) + .pop(); + BlocProvider.of(context) + .add(SubmitMobile( + mobile1: state.mobile1, + mobile2: mobileNumber2)); + }, + ); + }); + }), + const Divider(), + ListTile( + leading: const Icon( + Typicons.location, + color: second, + ), + title: Text("${state.locationData.latitude}/${state.locationData.longitude}"), + subtitle: Text( + currentLocation, + style: Theme.of(context).textTheme.bodySmall, + ), + ), + FormBuilderTextField( + name: "message", + validator: FormBuilderValidators.compose([ + FormBuilderValidators.required(errorText: messageRequired) + ]), + autovalidateMode: AutovalidateMode.onUserInteraction, + maxLines: 5, + decoration: normalTextFieldStyle("", sosMessage), + ), + const Expanded( + child: SizedBox(), + ), + SizedBox( + width: double.infinity, + height: screenHeight * .06, + child: ElevatedButton( + style: secondaryBtnStyle( + primary, Colors.transparent, Colors.white54), + child: const Text( + submit, + style: TextStyle(color: Colors.white), + ), + //// on pressed + onPressed: () async{ + if( formKey.currentState!.saveAndValidate()){ + String message = formKey.currentState!.value['message']; + DateTime today = DateTime.now(); + String requestedDate = + dteFormat.format(today); + BlocProvider.of(context).add(SendSOS(msg: message, requestDate: requestedDate)); + + } + + }, + ), + ), + ], + ), + )), + ); + } + return Container(); + }, + ); + } +} diff --git a/lib/screens/sos/components/sos_received.dart b/lib/screens/sos/components/sos_received.dart new file mode 100644 index 0000000..a8bad17 --- /dev/null +++ b/lib/screens/sos/components/sos_received.dart @@ -0,0 +1,133 @@ +import 'package:animate_do/animate_do.dart'; +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:unit2/theme-data.dart/btn-style.dart'; +import 'package:unit2/utils/text_container.dart'; +import '../../../theme-data.dart/colors.dart'; +import '../../../utils/global.dart'; + +class SOSreceived extends StatelessWidget { + final Function() onpressed; + const SOSreceived({super.key, required this.onpressed}); + + @override + Widget build(BuildContext context) { + + return Container( + padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 35), + height: screenHeight, + child: Stack( + children: [ + Positioned( + bottom: 0, + child: SizedBox( + width: screenWidth, + height: screenHeight / 2, + child: Opacity( + opacity: .2, + child: Image.asset( + "assets/pngs/emergency.png", + fit: BoxFit.cover, + ), + ), + )), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: blockSizeVertical * 6, + ), + Bounce( + from: 20, + infinite: true, + delay: const Duration(milliseconds: 800), + child: Stack( + alignment: AlignmentDirectional.topCenter, + children: [ + Container( + margin: const EdgeInsets.only(top: 20), + child: CircleAvatar( + radius: blockSizeVertical * 8, + backgroundColor: second, + child: Container( + margin: const EdgeInsets.only(top: 25), + child: SvgPicture.asset( + 'assets/svgs/sos.svg', + height: blockSizeHorizontal * 17, + color: Colors.white, + allowDrawingOutsideViewBox: true, + alignment: Alignment.bottomCenter, + ), + ), + ), + ), + Positioned( + top: blockSizeVertical * 3, + child: const SpinKitPulse( + color: primary, + size: 120, + ), + ), + ], + ), + ), + const SizedBox(height: 16), + SlideInUp( + from: 50, + child: AutoSizeText( + sosReceived, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.displayMedium!.copyWith( + fontSize: 40, + color: third, + fontWeight: FontWeight.w500, + ), + ), + ), + const SizedBox( + height: 8, + ), + SlideInUp( + from: 50, + child: Container( + padding: const EdgeInsets.all(15), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(15))), + child: AutoSizeText( + sOSReceivedMessage, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.caption!.copyWith( + fontSize: 16, + color: Colors.black87, + ), + ), + ), + ), + const SizedBox( + height: 40, + ), + Expanded(child: Container()), + SlideInUp( + child: SizedBox( + height: 50, + width: 200, + child: TextButton( + style: mainBtnStyle(second, Colors.transparent, second), + onPressed: onpressed, + child: const Text(cancelRequest, + style: TextStyle( + color: Colors.white, + )), + ), + ), + ) + ], + ), + ], + ), + ); + } +} diff --git a/lib/screens/sos/index.dart b/lib/screens/sos/index.dart new file mode 100644 index 0000000..f3bdb90 --- /dev/null +++ b/lib/screens/sos/index.dart @@ -0,0 +1,128 @@ +import 'dart:async'; + +import 'package:animate_do/animate_do.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/src/widgets/framework.dart'; +import 'package:flutter/src/widgets/placeholder.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_progress_hud/flutter_progress_hud.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:unit2/bloc/sos/sos_bloc.dart'; +import 'package:unit2/screens/sos/components/acknnowledge.dart'; +import 'package:unit2/screens/sos/components/add_mobile.dart'; +import 'package:unit2/screens/sos/components/request_sos.dart'; +import 'package:unit2/theme-data.dart/colors.dart'; +import 'package:unit2/utils/text_container.dart'; +import 'package:unit2/widgets/error_state.dart'; + +import '../../utils/global.dart'; +import '../../widgets/wave.dart'; +import 'components/request_sos.dart'; +import 'components/sos_received.dart'; + +class SosScreen extends StatefulWidget { + const SosScreen({super.key}); + + @override + State createState() => _SosScreenState(); +} + +class _SosScreenState extends State { + Timer? timer; + + @override + void dispose() { + timer != null ? timer!.cancel() : timer = null; + super.dispose(); + } + + @override + void initState() { + timer = Timer(Duration.zero, () {}); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: AppBar(backgroundColor: primary), + resizeToAvoidBottomInset: true, + body: ProgressHUD( + padding: const EdgeInsets.all(32), + backgroundColor: Colors.black87, + indicatorWidget: const SpinKitFadingCircle(color: Colors.white), + child: BlocConsumer( + listener: (context, state) { + if (state is ErrorState) { + final progress = ProgressHUD.of(context); + progress!.dismiss(); + } + ////loading state + if (state is LoadingState) { + final progress = ProgressHUD.of(context); + progress!.showWithText(state.message); + } + //// dismiss progress + if (state is ErrorState || state is SOSReceivedState || state is RequestSosState || state is UserLocationLoaded || state is SoSAcknowledgementConfirm) { + final progress = ProgressHUD.of(context); + progress!.dismiss(); + } + }, + builder: (context, state) { + //// error state + if (state is ErrorState) { + timer!.cancel(); + return SomethingWentWrong( + message: state.message, + onpressed: () { + context.read().add(LoadUserLocation()); + }); + } //// user location loaded + if (state is UserLocationLoaded) { + return AddMobile(); + + //// request sos state + } + if (state is RequestSosState) { + return const RequestSOS(); + } + //// received sos state + if (state is SOSReceivedState) { + timer = Timer.periodic(const Duration(seconds: 10), (timer) { + context.read().add( + CheckAcknowledgement(sessionToken: state.sessionToken)); + }); + return SOSreceived(onpressed: () async { + timer!.cancel(); + await SOS!.delete('session_token'); + Navigator.pop(context); + }); + } + ///// sos acknowledge and confirm + if (state is SoSAcknowledgementConfirm) { + return SosAcknowledged( + onpressed: () async { + timer!.cancel(); + await SOS!.delete('session_token'); + Navigator.pop(context); + }, + sessionData: state.sessionData); + } + return SizedBox( + height: screenHeight, + child: Stack(children: [ + + Positioned( + bottom: 0, + right: 0, + child: WaveReverse(height: blockSizeVertical * 8)) + ]), + ); + }, + ), + ), + )); + } +} diff --git a/lib/screens/sos/request_sos.dart b/lib/screens/sos/request_sos.dart deleted file mode 100644 index a98b654..0000000 --- a/lib/screens/sos/request_sos.dart +++ /dev/null @@ -1,109 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/container.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter_form_builder/flutter_form_builder.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:fluttericon/font_awesome5_icons.dart'; -import 'package:fluttericon/typicons_icons.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:unit2/screens/sos/components/mobile.dart'; -import 'package:unit2/theme-data.dart/colors.dart'; -import 'package:unit2/utils/text_container.dart'; - -import '../../theme-data.dart/btn-style.dart'; -import '../../theme-data.dart/form-style.dart'; -import '../../utils/global.dart'; - -class RequestSOS extends StatefulWidget { - const RequestSOS({super.key}); - - @override - State createState() => _RequestSOSState(); -} - -class _RequestSOSState extends State { - @override - Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - appBar: AppBar( - centerTitle: true, - title: const Text(sOSTitle), - backgroundColor: second, - ), - body: SingleChildScrollView( - child: Container( - height: screenHeight * .89, - padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 10), - child: Column( - children: [ - SizedBox( - height: blockSizeVertical * 2, - ), - SvgPicture.asset( - 'assets/svgs/request_sos.svg', - height: blockSizeVertical * 22, - allowDrawingOutsideViewBox: true, - ), - Mobile( - title: "09661548775", - subtitle: mobile1, - onPressed: () {}), - const Divider(), - Mobile( - title: "09661548775", - subtitle: mobile2, - onPressed: () {}), - const Divider(), - ListTile( - leading: const Icon( - Typicons.location, - color: second, - ), - title: Text("Latitude/Longitude"), - subtitle: Text( - currentLocation, - style: Theme.of(context).textTheme.caption, - ), - ), - FormBuilderTextField( - name: "message", - validator: FormBuilderValidators.compose([ - FormBuilderValidators.required( - errorText: messageRequired) - ]), - autovalidateMode: AutovalidateMode.onUserInteraction, - maxLines: 5, - decoration: normalTextFieldStyle("", sosMessage), - ), - const Expanded( - child: SizedBox(), - ), - SizedBox( - width: double.infinity, - height: screenHeight * .06, - child: ElevatedButton( - style: secondaryBtnStyle( - second, Colors.transparent, Colors.white54), - child: const Text( - submit, - style: TextStyle(color: Colors.white), - ), - onPressed: () { - // if (_formKey.currentState.validate()) { - // _formKey.currentState.save(); - // BlocProvider.of(context) - // .add(UserWebLogin( - // password: password, - // username: username)); - // } - }, - ), - ), - ], - )), - ), - ), - ); - } -} diff --git a/lib/screens/sos/sos_received.dart b/lib/screens/sos/sos_received.dart deleted file mode 100644 index c89b81c..0000000 --- a/lib/screens/sos/sos_received.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'package:animate_do/animate_do.dart'; -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:unit2/theme-data.dart/btn-style.dart'; -import 'package:unit2/utils/text_container.dart'; -import '../../theme-data.dart/colors.dart'; -import '../../utils/global.dart'; - -class SOSreceived extends StatelessWidget { - final Function onpressed; - const SOSreceived({required Key key, required this.onpressed}) - : super(key: key); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 35), - height: screenHeight, - child: Stack( - children: [ - Positioned( - bottom: 0, - child: SizedBox( - width: screenWidth, - height: screenHeight / 2, - child: Opacity( - opacity: .2, - child: Image.asset( - "assets/emergency.png", - fit: BoxFit.cover, - ), - ), - )), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: blockSizeVertical * 6, - ), - Bounce( - from: 20, - infinite: true, - delay: const Duration(milliseconds: 800), - child: Stack( - alignment: AlignmentDirectional.topCenter, - children: [ - Container( - margin: const EdgeInsets.only(top: 20), - child: CircleAvatar( - radius: blockSizeVertical * 8, - backgroundColor: second, - child: Container( - margin: const EdgeInsets.only(top: 25), - child: SvgPicture.asset( - 'assets/sos.svg', - height: blockSizeHorizontal * 17, - color: Colors.white, - allowDrawingOutsideViewBox: true, - alignment: Alignment.bottomCenter, - ), - ), - ), - ), - Positioned( - top: blockSizeVertical * 3, - child: const SpinKitPulse( - color: primary, - size: 120, - ), - ), - ], - ), - ), - const SizedBox(height: 16), - SlideInUp( - from: 50, - child: AutoSizeText( - sosReceived, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.displayMedium!.copyWith( - fontSize: 40, - color: third, - fontWeight: FontWeight.w500, - ), - ), - ), - const SizedBox( - height: 8, - ), - SlideInUp( - from: 50, - child: Container( - padding: const EdgeInsets.all(15), - decoration: const BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(15))), - child: AutoSizeText( - sOSReceivedMessage, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.caption!.copyWith( - fontSize: 16, - color: Colors.black87, - ), - ), - ), - ), - const SizedBox( - height: 40, - ), - Expanded(child: Container()), - SlideInUp( - child: SizedBox( - height: 50, - width: 200, - child: TextButton( - style: mainBtnStyle(second, Colors.transparent, second), - onPressed: () {}, - child: const Text(cancelRequest, - style: TextStyle( - color: Colors.white, - )), - ), - ), - ) - ], - ), - ], - ), - ); - } -} diff --git a/lib/screens/unit2/basic-info/basic-info.dart b/lib/screens/unit2/basic-info/basic-info.dart index 6459508..c16824a 100644 --- a/lib/screens/unit2/basic-info/basic-info.dart +++ b/lib/screens/unit2/basic-info/basic-info.dart @@ -5,6 +5,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; import 'package:intl/intl.dart'; import 'package:qr_flutter/qr_flutter.dart'; +import 'package:signature/signature.dart'; import 'package:unit2/model/login_data/user_info/user_data.dart'; import 'package:unit2/theme-data.dart/btn-style.dart'; import 'package:unit2/utils/global.dart'; @@ -12,6 +13,7 @@ import 'package:unit2/utils/text_container.dart'; import '../../../bloc/user/user_bloc.dart'; import '../../../theme-data.dart/colors.dart'; import '../../../widgets/splash_screen.dart'; +import '../signature/signature_pad.dart'; import './components/cover-image.dart'; class BasicInfo extends StatelessWidget { @@ -159,6 +161,9 @@ class BuildInformation extends StatelessWidget { style: mainBtnStyle(third, Colors.transparent, Colors.white54), onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (BuildContext context){ + return SignaturePad(); + })); }, icon: const Icon( FontAwesome5.signature, diff --git a/lib/screens/unit2/homepage.dart/components/menu-screen.dart b/lib/screens/unit2/homepage.dart/components/menu-screen.dart index 312d2d0..65b3621 100644 --- a/lib/screens/unit2/homepage.dart/components/menu-screen.dart +++ b/lib/screens/unit2/homepage.dart/components/menu-screen.dart @@ -56,7 +56,7 @@ class _MenuScreenState extends State { getTile(FontAwesome5.user_circle, "Profile", '/profile', context, widget.userData!), const Divider(), - getTile(FontAwesome5.life_ring, "Request SOS", '/request-sos', + getTile(FontAwesome5.life_ring, "Request SOS", '/sos', context, widget.userData!), const Divider(), Expanded( diff --git a/lib/screens/unit2/homepage.dart/components/menu.dart b/lib/screens/unit2/homepage.dart/components/menu.dart index 5ddc5cf..10103f7 100644 --- a/lib/screens/unit2/homepage.dart/components/menu.dart +++ b/lib/screens/unit2/homepage.dart/components/menu.dart @@ -30,6 +30,8 @@ Widget getTile( Navigator.pushNamed(context, route,arguments: profileArguments); }if(title.toLowerCase() == 'basic info'){ Navigator.pushNamed(context, '/basic-info'); + }if(title.toLowerCase() == 'request sos'){ + Navigator.pushNamed(context, '/sos'); } }, diff --git a/lib/screens/unit2/login/login.dart b/lib/screens/unit2/login/login.dart index 7e2c7d9..bba33c3 100644 --- a/lib/screens/unit2/login/login.dart +++ b/lib/screens/unit2/login/login.dart @@ -78,7 +78,7 @@ class _UniT2LoginState extends State { final progress = ProgressHUD.of(context); progress!.dismiss(); errorAlert(context, "Error Login", state.message, () { - context.read().add(LoadVersion()); + context.read().add(LoadVersion(username: username,password: password)); Navigator.of(context).pop(); }); } @@ -138,9 +138,10 @@ class _UniT2LoginState extends State { SizedBox( height: blockSizeVertical * 3, ), - // USERNAME + //// USERNAME FormBuilderTextField( name: 'username', + initialValue: state.username, validator: FormBuilderValidators.required( errorText: usernameRequired), @@ -153,9 +154,10 @@ class _UniT2LoginState extends State { SizedBox( height: blockSizeVertical * 1.5, ), - // PASSWORD + //// PASSWORD FormBuilderTextField( name: 'password', + initialValue: state.password, validator: FormBuilderValidators.required( errorText: passwordRequired), onChanged: (value) { @@ -222,7 +224,7 @@ class _UniT2LoginState extends State { ), SizedBox( height: blockSizeVertical * 7, - // Login Button + //// Login Button child: SizedBox( width: MediaQuery.of(context).size.width, @@ -296,12 +298,12 @@ class _UniT2LoginState extends State { ), )), SizedBox( - height: blockSizeVertical * 1, + height: blockSizeVertical * 2, ), const LoginViaQr( text: emergencyReponseLabel), SizedBox( - height: blockSizeVertical * 1, + height: blockSizeVertical * 2, ), // REQUEST SOS SizedBox( @@ -317,7 +319,7 @@ class _UniT2LoginState extends State { Colors.transparent, Colors.white38), onPressed: () { - + Navigator.pushNamed(context, '/sos'); }, label: const Text( requestSOS, diff --git a/lib/sevices/sos/sos_service.dart b/lib/sevices/sos/sos_service.dart new file mode 100644 index 0000000..0cb0697 --- /dev/null +++ b/lib/sevices/sos/sos_service.dart @@ -0,0 +1,125 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:flutter/services.dart'; +import 'package:intl/intl.dart'; +import 'package:location/location.dart'; +import 'package:platform_device_id/platform_device_id.dart'; +import 'package:http/http.dart' as http; +import 'package:unit2/utils/request.dart'; +import '../../model/sos/session.dart'; +import '../../utils/urls.dart'; + +class SosService{ + static final SosService _instance = SosService(); + static SosService get instance => _instance; + DateFormat todayFormat = DateFormat("yMdHms"); + Future getUserLocation() async { + Location location = Location(); + LocationData? locationData; + bool serviceEnabled = false; + PermissionStatus permissionGranted; + + serviceEnabled = await location.serviceEnabled(); + if (!serviceEnabled) { + serviceEnabled = await location.requestService(); + if (!serviceEnabled) { + return null; + } + } + permissionGranted = await location.hasPermission(); + if (permissionGranted == PermissionStatus.denied) { + permissionGranted = await location.requestPermission(); + if (permissionGranted != PermissionStatus.granted) { + return null; + } + } + try{ + LocationData newLocationData = await location.getLocation(); + locationData = newLocationData; + return locationData; + }catch(e){ + throw e.toString(); + } + } + Future initPlatformState() async { + String? deviceId; + try { + deviceId = await PlatformDeviceId.getDeviceId; + } on PlatformException { + deviceId = 'Failed to get deviceId.'; + } + return deviceId!; + } + + +Future requestSos({required LocationData location, required String mobile1, + String? mobile2, required String msg, required String requestedDate}) async { + var body; + String deviceId = await initPlatformState(); + String sessionToken = + deviceId.toString() + todayFormat.format(DateTime.now()); + String path = Url.instance.sosRequest(); + SessionData? sessionData; + + if(mobile2 != null){ + body = { + "mobile_id": deviceId.toString(), + "mobile_gps": + "${location.latitude.toString()},${location.longitude.toString()}", + "mobile1": mobile1, + "mobile2": mobile2, + "respondent_message": msg, + "session_token": sessionToken, + "pushedbutton_date": requestedDate + }; + }else{ + body = { + "mobile_id": deviceId.toString(), + "mobile_gps": + "${location.latitude.toString()},${location.longitude.toString()}", + "mobile1": mobile1, + "respondent_message": msg, + "session_token": sessionToken, + "pushedbutton_date": requestedDate + }; + } + + Map headers = { + 'Content-Type': 'application/json; charset=UTF-8', + }; + + try { + http.Response response = await Request.instance.postRequest(path: path,body: body,headers: headers); + if (response.statusCode == 201) { + var body = jsonDecode(response.body); + SessionData newSessionData = SessionData.fromJson(body['data']); + sessionData = newSessionData; + } + + }on Error catch (e) { + throw (e.toString()); + } + return sessionData!; + } + + + Future checkAcknowledgement(String sessionToken) async { + String path = Url.instance.sosRequest(); + SessionData? sessionData; + try { + http.Response response = await Request.instance.getRequest(path: path,param:{"session_token":sessionToken} ); + if (response.statusCode == 200) { + var body = jsonDecode(response.body); + SessionData newSessionData = SessionData.fromJson(body['data'][0]); + + sessionData = newSessionData; + + } + } on Error + catch (e) { + throw (e.toString()); + } + return sessionData!; + } +} \ No newline at end of file diff --git a/lib/utils/app_router.dart b/lib/utils/app_router.dart index 7e6d33c..9db2326 100644 --- a/lib/utils/app_router.dart +++ b/lib/utils/app_router.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:unit2/bloc/profile/profile_bloc.dart'; +import 'package:unit2/bloc/sos/sos_bloc.dart'; +import 'package:unit2/screens/sos/index.dart'; import 'package:unit2/screens/unit2/homepage.dart/components/menu.dart'; import 'package:unit2/screens/unit2/login/login.dart'; import 'package:unit2/utils/global_context.dart'; @@ -34,13 +36,21 @@ class AppRouter { return const QRLogin(); }); case '/profile': - ProfileArguments arguments = routeSettings.arguments as ProfileArguments; - BlocProvider.of( + ProfileArguments arguments = + routeSettings.arguments as ProfileArguments; + BlocProvider.of( NavigationService.navigatorKey.currentContext!) - .add(LoadProfile(token:arguments.token ,userID:arguments.userID )); + .add(LoadProfile(token: arguments.token, userID: arguments.userID)); return MaterialPageRoute(builder: (_) { return const ProfileInfo(); }); + case '/sos': + return MaterialPageRoute(builder: (BuildContext context) { + return BlocProvider( + create: (_) => SosBloc()..add(LoadUserLocation()), + child: const SosScreen(), + ); + }); default: return MaterialPageRoute(builder: (context) { return Container(); diff --git a/lib/utils/global.dart b/lib/utils/global.dart index de816db..65b6eaf 100644 --- a/lib/utils/global.dart +++ b/lib/utils/global.dart @@ -12,4 +12,4 @@ double safeBlockVertical = 0; //// hive boxes Box? CREDENTIALS; -Box? SOSCONTACTS; \ No newline at end of file +Box? SOS; \ No newline at end of file diff --git a/lib/utils/urls.dart b/lib/utils/urls.dart index 8849535..0d165e9 100644 --- a/lib/utils/urls.dart +++ b/lib/utils/urls.dart @@ -3,10 +3,10 @@ class Url { static Url get instance => _instance; String host() { - // return '192.168.10.221:3003'; - return 'agusandelnorte.gov.ph'; + // return '192.168.10.183:3000'; + // return 'agusandelnorte.gov.ph'; // return "192.168.10.219:3000"; - // return "devweb.agusandelnorte.gov.ph"; + return "devweb.agusandelnorte.gov.ph"; // return 'devapi.agusandelnorte.gov.ph:3004'; } @@ -22,6 +22,11 @@ class Url { return "/api/system_app/apk_version/latest"; } + ////SOS paths + String sosRequest(){ + return "/api/sos_app/sos_request/"; + } + ////ELIGIBILITIES PATHS String eligibilities(){ return "/api/jobnet_app/eligibilities/"; diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index a124bbe..4b37fe9 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,9 +7,13 @@ #include "generated_plugin_registrant.h" #include +#include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) modal_progress_hud_nsn_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "ModalProgressHudNsnPlugin"); modal_progress_hud_nsn_plugin_register_with_registrar(modal_progress_hud_nsn_registrar); + g_autoptr(FlPluginRegistrar) platform_device_id_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "PlatformDeviceIdLinuxPlugin"); + platform_device_id_linux_plugin_register_with_registrar(platform_device_id_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index f6f1987..f64d1cc 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST modal_progress_hud_nsn + platform_device_id_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 4567379..7a1cdf6 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,16 +5,22 @@ import FlutterMacOS import Foundation +import location import modal_progress_hud_nsn import package_info_plus import path_provider_foundation +import platform_device_id +import platform_device_id_macos import shared_preferences_foundation import sqflite func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin")) ModalProgressHudNsnPlugin.register(with: registry.registrar(forPlugin: "ModalProgressHudNsnPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin")) + PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) } diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 42d76d9..d473e2f 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -3,6 +3,8 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) + - location (0.0.1): + - FlutterMacOS - modal_progress_hud_nsn (0.0.1): - FlutterMacOS - package_info_plus (0.0.1): @@ -10,6 +12,10 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - platform_device_id (0.0.1): + - FlutterMacOS + - platform_device_id_macos (0.0.1): + - FlutterMacOS - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS @@ -19,9 +25,12 @@ PODS: DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) + - location (from `Flutter/ephemeral/.symlinks/plugins/location/macos`) - modal_progress_hud_nsn (from `Flutter/ephemeral/.symlinks/plugins/modal_progress_hud_nsn/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`) + - platform_device_id (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos`) + - platform_device_id_macos (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id_macos/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`) - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`) @@ -32,12 +41,18 @@ SPEC REPOS: EXTERNAL SOURCES: FlutterMacOS: :path: Flutter/ephemeral + location: + :path: Flutter/ephemeral/.symlinks/plugins/location/macos modal_progress_hud_nsn: :path: Flutter/ephemeral/.symlinks/plugins/modal_progress_hud_nsn/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos + platform_device_id: + :path: Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos + platform_device_id_macos: + :path: Flutter/ephemeral/.symlinks/plugins/platform_device_id_macos/macos shared_preferences_foundation: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos sqflite: @@ -46,10 +61,13 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + location: 7cdb0665bd6577d382b0a343acdadbcb7f964775 modal_progress_hud_nsn: 8099d46c2cf9de7af8fe0a3f8f5d2aa32cf956c3 package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce - path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852 - shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca + path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + platform_device_id: 3e414428f45df149bbbfb623e2c0ca27c545b763 + platform_device_id_macos: f763bb55f088be804d61b96eb4710b8ab6598e94 + shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..3e337c3 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,1391 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "4897882604d919befd350648c7f91926a9d5de99e67b455bf0917cc2362f4bb8" + url: "https://pub.dev" + source: hosted + version: "47.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "690e335554a8385bc9d787117d9eb52c0c03ee207a607e593de3c9d71b1cfe80" + url: "https://pub.dev" + source: hosted + version: "4.7.0" + animate_do: + dependency: "direct main" + description: + name: animate_do + sha256: "9aeacc1a7238f971c039bdf45d13c628be554a242e0251c4ddda09d19a1a923f" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + app_popup_menu: + dependency: "direct main" + description: + name: app_popup_menu + sha256: e05b262b65289431603a84e04e53cb2f3aca6013d3ea61e3f24ddd48d49ef848 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + archive: + dependency: transitive + description: + name: archive + sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + url: "https://pub.dev" + source: hosted + version: "3.3.7" + args: + dependency: transitive + description: + name: args + sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + async: + dependency: transitive + description: + name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" + source: hosted + version: "2.10.0" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + awesome_dialog: + dependency: "direct main" + description: + name: awesome_dialog + sha256: ac08268b991f228fc6b8880b68ec030d2941bcc8df8b6a6551fb79f2bd36b7da + url: "https://pub.dev" + source: hosted + version: "3.0.2" + azlistview: + dependency: "direct main" + description: + name: azlistview + sha256: "93e865f11777a271b439f0d6b00799c0797e9daeec2e082a2e01373809c4b90d" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + badges: + dependency: "direct main" + description: + name: badges + sha256: d33d4e07197d6e61ddc940640f2b4dc303d3c80887011344940e24d7522f8d26 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + barcode_scan2: + dependency: "direct main" + description: + name: barcode_scan2 + sha256: "0b0625d27841a21e36e896195d86b2aada335e3c486f63647cce701495718e16" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + bloc: + dependency: transitive + description: + name: bloc + sha256: "658a5ae59edcf1e58aac98b000a71c762ad8f46f1394c34a52050cafb3e11a80" + url: "https://pub.dev" + source: hosted + version: "8.1.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "687cf90a3951affac1bd5f9ecb5e3e90b60487f3d9cdc359bb310f8876bb02a6" + url: "https://pub.dev" + source: hosted + version: "2.0.10" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + url: "https://pub.dev" + source: hosted + version: "2.3.3" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + url: "https://pub.dev" + source: hosted + version: "7.2.7" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0" + url: "https://pub.dev" + source: hosted + version: "8.4.4" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + url: "https://pub.dev" + source: hosted + version: "3.2.3" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + url: "https://pub.dev" + source: hosted + version: "1.0.2" + characters: + dependency: transitive + description: + name: characters + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" + source: hosted + version: "1.2.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + collection: + dependency: transitive + description: + name: collection + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" + source: hosted + version: "1.17.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + convex_bottom_bar: + dependency: "direct main" + description: + name: convex_bottom_bar + sha256: ebf0f3deb1e8e99374d844fee7485d2980ec502dedfaad395c12118477933aef + url: "https://pub.dev" + source: hosted + version: "3.2.0" + cool_alert: + dependency: "direct main" + description: + name: cool_alert + sha256: "48a0b6c04914b6dc7e8d7eaccf2adf21bace6533a3eda0aeb412e0d7a03dc00a" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + date_time_picker: + dependency: "direct main" + description: + name: date_time_picker + sha256: "6923c568bcb67a66ab7e083708d0adbcae8214b41bb84d49febc17e89e06fc4a" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + device_frame: + dependency: transitive + description: + name: device_frame + sha256: afe76182aec178d171953d9b4a50a43c57c7cf3c77d8b09a48bf30c8fa04dd9d + url: "https://pub.dev" + source: hosted + version: "1.1.0" + device_info: + dependency: transitive + description: + name: device_info + sha256: f4a8156cb7b7480d969cb734907d18b333c8f0bc0b1ad0b342cdcecf30d62c48 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + device_info_platform_interface: + dependency: transitive + description: + name: device_info_platform_interface + sha256: b148e0bf9640145d09a4f8dea96614076f889e7f7f8b5ecab1c7e5c2dbc73c1b + url: "https://pub.dev" + source: hosted + version: "2.0.1" + device_preview: + dependency: "direct main" + description: + name: device_preview + sha256: "2f097bf31b929e15e6756dbe0ec1bcb63952ab9ed51c25dc5a2c722d2b21fdaf" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + dio: + dependency: "direct main" + description: + name: dio + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + url: "https://pub.dev" + source: hosted + version: "4.0.6" + easy_app_installer: + dependency: "direct main" + description: + name: easy_app_installer + sha256: d7287bf247fe6bc85ad07dfb85804757a6dd2f47e61b0e7ce9195ec7f13e09eb + url: "https://pub.dev" + source: hosted + version: "1.0.0" + equatable: + dependency: "direct main" + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" + expandable_group: + dependency: "direct main" + description: + name: expandable_group + sha256: "874f9c2daef8a21366fb1df85405f80ee8e8be6e3c2ced727c303641b33b9a95" + url: "https://pub.dev" + source: hosted + version: "0.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + file_utils: + dependency: transitive + description: + name: file_utils + sha256: d1e64389a22649095c8405c9e177272caf05139255931c9ff30d53b5c9bcaa34 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + filter_list: + dependency: "direct main" + description: + name: filter_list + sha256: "2d80d6d19beb7847c1176e8bf6fe06d302b23eb7d1bf48c231dd730409ff9b4d" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flare_flutter: + dependency: transitive + description: + name: flare_flutter + sha256: "99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: "434951eea948dbe87f737b674281465f610b8259c16c097b8163ce138749a775" + url: "https://pub.dev" + source: hosted + version: "8.1.2" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + url: "https://pub.dev" + source: hosted + version: "3.3.0" + flutter_custom_clippers: + dependency: "direct main" + description: + name: flutter_custom_clippers + sha256: "473e3daf61c2a6cee0ad137393259a25223239d519a131c7ec1cac04d06e5407" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + flutter_form_builder: + dependency: "direct main" + description: + name: flutter_form_builder + sha256: "9551c7379adc01a3a3a1100057396407c9534ea8adc937d14a0edd96fcd9e1dc" + url: "https://pub.dev" + source: hosted + version: "7.8.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" + source: hosted + version: "2.0.1" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf + url: "https://pub.dev" + source: hosted + version: "2.0.9" + flutter_progress_hud: + dependency: "direct main" + description: + name: flutter_progress_hud + sha256: "19a4889460b7482c5026a936b768996dade4daad8570e8c0493e292d57121dbb" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + flutter_spinkit: + dependency: "direct main" + description: + name: flutter_spinkit + sha256: "77a2117c0517ff909221f3160b8eb20052ab5216107581168af574ac1f05dff8" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + url: "https://pub.dev" + source: hosted + version: "1.1.6" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_zoom_drawer: + dependency: "direct main" + description: + name: flutter_zoom_drawer + sha256: b439c87d63680465582ac301f2502dea6f95ddcba3a9787365dcadb52777c1e1 + url: "https://pub.dev" + source: hosted + version: "3.0.4+1" + fluttericon: + dependency: "direct main" + description: + name: fluttericon + sha256: "252fa8043826e93d972a602497a260cb3d62b5aea6d045793e4381590f2c1e99" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "2f9c4d3f4836421f7067a28f8939814597b27614e021da9d63e5d3fb6e212d25" + url: "https://pub.dev" + source: hosted + version: "8.2.1" + form_builder_validators: + dependency: "direct main" + description: + name: form_builder_validators + sha256: d0a940d77231723fcb203ad6f5319ff30cd0c4412a6e74d29d826957b1f9afe0 + url: "https://pub.dev" + source: hosted + version: "8.5.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + url: "https://pub.dev" + source: hosted + version: "2.2.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + globbing: + dependency: transitive + description: + name: globbing + sha256: "4f89cfaf6fa74c9c1740a96259da06bd45411ede56744e28017cc534a12b6e2d" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + graphs: + dependency: transitive + description: + name: graphs + sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + url: "https://pub.dev" + source: hosted + version: "2.2.0" + hive: + dependency: "direct main" + description: + name: hive + sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + hive_flutter: + dependency: "direct main" + description: + name: hive_flutter + sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc + url: "https://pub.dev" + source: hosted + version: "1.1.0" + hive_generator: + dependency: "direct dev" + description: + name: hive_generator + sha256: "81fd20125cb2ce8fd23623d7744ffbaf653aae93706c9bd3bf7019ea0ace3938" + url: "https://pub.dev" + source: hosted + version: "1.1.3" + http: + dependency: transitive + description: + name: http + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" + source: hosted + version: "0.13.5" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image: + dependency: transitive + description: + name: image + sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + url: "https://pub.dev" + source: hosted + version: "3.3.0" + intl: + dependency: "direct main" + description: + name: intl + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" + source: hosted + version: "0.17.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" + source: hosted + version: "4.8.0" + lints: + dependency: transitive + description: + name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + location: + dependency: "direct main" + description: + name: location + sha256: "9051959f6f2ccadd887b28b66e9cbbcc25b6838e37cf9e894c421ccc0ebf80b5" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + sha256: "62eeaf1658e92e4459b727f55a3c328eccbac8ba043fa6d262ac5286ad48384c" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + location_web: + dependency: transitive + description: + name: location_web + sha256: "6c08c408a040534c0269c4ff9fe17eebb5a36dea16512fbaf116b9c8bc21545b" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + lottie: + dependency: transitive + description: + name: lottie + sha256: "893da7a0022ec2fcaa616f34529a081f617e86cc501105b856e5a3184c58c7c2" + url: "https://pub.dev" + source: hosted + version: "1.4.3" + mask_text_input_formatter: + dependency: "direct main" + description: + name: mask_text_input_formatter + sha256: "19bb7809c3c2559277e95521b3ee421e1409eb2cc85efd2feb191696c92490f4" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" + source: hosted + version: "0.12.13" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + modal_progress_hud_nsn: + dependency: "direct main" + description: + name: modal_progress_hud_nsn + sha256: "408b9bcce97567de94637de932260e50be48db1842edc761aeea61670e5ec30c" + url: "https://pub.dev" + source: hosted + version: "0.3.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: cbff87676c352d97116af6dbea05aa28c4d65eb0f6d5677a520c11a69ca9a24d + url: "https://pub.dev" + source: hosted + version: "3.1.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + path: + dependency: transitive + description: + name: path + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" + source: hosted + version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 + url: "https://pub.dev" + source: hosted + version: "2.0.14" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" + url: "https://pub.dev" + source: hosted + version: "2.0.24" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "818b2dc38b0f178e0ea3f7cf3b28146faab11375985d815942a68eee11c2d0f7" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + url: "https://pub.dev" + source: hosted + version: "2.1.10" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 + url: "https://pub.dev" + source: hosted + version: "2.1.5" + pedantic: + dependency: transitive + description: + name: pedantic + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "33c6a1253d1f95fd06fa74b65b7ba907ae9811f9d5c1d3150e51417d04b8d6a8" + url: "https://pub.dev" + source: hosted + version: "10.2.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "8028362b40c4a45298f1cbfccd227c8dd6caf0e27088a69f2ba2ab15464159e2" + url: "https://pub.dev" + source: hosted + version: "10.2.0" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: ee96ac32f5a8e6f80756e25b25b9f8e535816c8e6665a96b6d70681f8c4f7e85 + url: "https://pub.dev" + source: hosted + version: "9.0.8" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "68abbc472002b5e6dfce47fe9898c6b7d8328d58b5d2524f75e277c07a97eb84" + url: "https://pub.dev" + source: hosted + version: "3.9.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: f67cab14b4328574938ecea2db3475dad7af7ead6afab6338772c5f88963e38b + url: "https://pub.dev" + source: hosted + version: "0.1.2" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + platform_device_id: + dependency: "direct main" + description: + name: platform_device_id + sha256: "7a12ec84de4a823bb10eba2f0e1ad29e2365abba17790489a0d78029904f562e" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + platform_device_id_linux: + dependency: transitive + description: + name: platform_device_id_linux + sha256: "994b1608593e527a629af2d5aeb241c60d308d3434bc78b0f6fcb3c1a02dff43" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + platform_device_id_macos: + dependency: transitive + description: + name: platform_device_id_macos + sha256: "968db2a504c611294b12a031b3734432d6df10553a0d3ae3b33ed21abfdbaba0" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + platform_device_id_platform_interface: + dependency: transitive + description: + name: platform_device_id_platform_interface + sha256: c61607594252aaddacf3e4c4371ab08f2ef85ff427817fa6e48a169429610c46 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + platform_device_id_web: + dependency: transitive + description: + name: platform_device_id_web + sha256: "58e124594e1165db7f108395a780b1d1e1cd403021978e5228cf4289fbe736d5" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + platform_device_id_windows: + dependency: transitive + description: + name: platform_device_id_windows + sha256: dbf8dcf03ad8555320ebae2403a3081b79f137f37661874e161fe2de0a84eeeb + url: "https://pub.dev" + source: hosted + version: "1.0.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: c3120a968135aead39699267f4c74bc9a08e4e909e86bc1b0af5bfd78691123c + url: "https://pub.dev" + source: hosted + version: "3.7.2" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + provider: + dependency: transitive + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: ec85d7d55339d85f44ec2b682a82fea340071e8978257e5a43e69f79e98ef50c + url: "https://pub.dev" + source: hosted + version: "1.2.2" + qr: + dependency: transitive + description: + name: qr + sha256: "5c4208b4dc0d55c3184d10d83ee0ded6212dc2b5e2ba17c5a0c0aab279128d21" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + qr_flutter: + dependency: "direct main" + description: + name: qr_flutter + sha256: c5c121c54cb6dd837b9b9d57eb7bc7ec6df4aee741032060c8833a678c80b87e + url: "https://pub.dev" + source: hosted + version: "4.0.0" + rive: + dependency: transitive + description: + name: rive + sha256: "22e3755b75f4ea4492d2fecf4fc2acf1c8d0073df39781d290a20cbfe74c3760" + url: "https://pub.dev" + source: hosted + version: "0.9.1" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" + scrollable_positioned_list: + dependency: transitive + description: + name: scrollable_positioned_list + sha256: "9566352ab9ba05794ee6c8864f154afba5d36c5637d0e3e32c615ba4ceb92772" + url: "https://pub.dev" + source: hosted + version: "0.2.3" + searchfield: + dependency: "direct main" + description: + name: searchfield + sha256: deb363c95b9e64ea9ffd1a3b69926b0fe0344daedab872fc42014755a8199de9 + url: "https://pub.dev" + source: hosted + version: "0.7.5" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "858aaa72d8f61637d64e776aca82e1c67e6d9ee07979123c5d17115031c1b13b" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "8304d8a1f7d21a429f91dee552792249362b68a331ac5c3c1caf370f658873f6" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: cf2a42fb20148502022861f71698db12d937c7459345a1bdaa88fc91a91b3603 + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9d387433ca65717bbf1be88f4d5bb18f10508917a8fa2fb02e0fd0d7479a9afa" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "74083203a8eae241e0de4a0d597dbedab3b8fef5563f33cf3c12d7e93c655ca5" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "5e588e2efef56916a3b229c3bfe81e6a525665a454519ca51dbcc4236a274173" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + url: "https://pub.dev" + source: hosted + version: "1.4.0" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + url: "https://pub.dev" + source: hosted + version: "1.0.3" + signature: + dependency: "direct main" + description: + name: signature + sha256: ad23383717dfa926204695ef6928ff513a77387be1b4a8c685099ce3ec35e5f8 + url: "https://pub.dev" + source: hosted + version: "5.3.0" + simple_chips_input: + dependency: "direct main" + description: + name: simple_chips_input + sha256: "522b2e715fe67f325693e003acfd09fc0b8ab25a2c0c87fb8e5ce5b23a8a2ec1" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d" + url: "https://pub.dev" + source: hosted + version: "1.2.6" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + source_span: + dependency: transitive + description: + name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" + source: hosted + version: "1.9.1" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758" + url: "https://pub.dev" + source: hosted + version: "2.2.6" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684" + url: "https://pub.dev" + source: hosted + version: "2.4.3" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + system_info2: + dependency: "direct main" + description: + name: system_info2 + sha256: "90621f3ba586e1f268e38cc7951b172cd4d997e43dc1fbed12eb334c8a22a886" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + toggle_switch: + dependency: "direct main" + description: + name: toggle_switch + sha256: "82c778c4bfe93af154a41e346ccd1d5b0cb6a50f8f187941412edd0a9bbf51ee" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + watcher: + dependency: transitive + description: + name: watcher + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + url: "https://pub.dev" + source: hosted + version: "2.3.0" + win32: + dependency: transitive + description: + name: win32 + sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 + url: "https://pub.dev" + source: hosted + version: "3.1.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" + source: hosted + version: "6.2.2" + yaml: + dependency: transitive + description: + name: yaml + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" + source: hosted + version: "3.1.1" +sdks: + dart: ">2.19.0 <3.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5cd2be5..ab0bffe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -76,6 +76,8 @@ dependencies: hive: ^2.0.5 hive_flutter: ^1.1.0 mask_text_input_formatter: ^2.4.0 + location: ^4.3.0 + platform_device_id: ^1.0.1 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c1aa7e0..458cc68 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,10 +8,13 @@ #include #include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { ModalProgressHudNsnPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ModalProgressHudNsnPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); + PlatformDeviceIdWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PlatformDeviceIdWindowsPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 2446653..4c970ab 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST modal_progress_hud_nsn permission_handler_windows + platform_device_id_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST