diff --git a/assets/api_constants.json b/assets/api_constants.json index 3fdbcb0..bd35e33 100644 --- a/assets/api_constants.json +++ b/assets/api_constants.json @@ -3,68 +3,68 @@ "api": "loadFutureEvents", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "saveUserInterestedEvent", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "saveUserAttendingEvent", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "eventOverview", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "getSpecialitiesDonutChart", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "getTopicCloudChart", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "getTopAffiliationBarChart", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "eventSpeakers", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "saveEventsTopicNote", "interval": 5, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "eventUserAnalytics", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "saveEventOffline", "interval": 0, "method": "POST", - "module": "eventapis" + "module": "apis/v1/events" }, { "api": "contactslistapi", diff --git a/lib/main.dart b/lib/main.dart index 2313bf7..efd1b4e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -598,19 +598,7 @@ Future main() async { print("checkhere before:$isloggedIn"); String secretkey = instance.getString('secretkey') ?? ""; - OverlaySupportEntry entry; - Connectivity().onConnectivityChanged.listen((event) { - print("CHECK INTERNET"); - print(event); - if (event.toString().contains("ConnectivityResult.none")) { - entry = showOverlayNotification((context) { - return Text("this is a message from simple notification"); - }, duration: Duration(hours: 1)); - } - }); - OverlaySupport overlaySupport = OverlaySupport.global( - child: Text("ONLINE"), - ); + runApp( MultiProvider( providers: [ @@ -681,7 +669,7 @@ Future main() async { print("isLoggedIn_is : $isLoggedIn"); print("secret : $secretkey"); return isLoggedIn - ? IntroductionAnimationScreen() + ? NavigationHomeScreen() : IntroductionAnimationScreen(); } }, diff --git a/lib/utils/apicall.dart b/lib/utils/apicall.dart index 3ffa0b4..96fe4e0 100644 --- a/lib/utils/apicall.dart +++ b/lib/utils/apicall.dart @@ -32,9 +32,18 @@ class ApiCall { final dio = Dio(); final Future _prefs = SharedPreferences.getInstance(); - late Future _token; - String newtoken = - "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWNyZXRlVG9rZW4iOiJiYjNmOTZmYmI5Y2U3ZjA2ZTliOTlkMzRiMGM3YjZkZTBlNjBmYWYzYmM1NDFhZjY0MGQ5ZjAzMGRlNzMxOWM4ZTAwZWNkMCIsImlhdCI6MTczNDM0OTUwNywiZXhwIjoxNzM0MzUxMzA3fQ.nN5XtgmWHVGGdyLEdICY6jTmlg1070rGFwsdyOd4CYY"; + String token = ""; + ApiCall() { + init(); + print("constructor"); + } + + init() async { + token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); + } + //K1 API CALLS Future parseInfo() async { Dio dio = Dio(); @@ -117,41 +126,44 @@ class ApiCall { Future> getEventsFromK1({int? type}) async { Dio dio = Dio(); - (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = - (HttpClient client) { - client.badCertificateCallback = - (X509Certificate cert, String host, int port) => true; - return client; - }; + // (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = + // (HttpClient client) { + // client.badCertificateCallback = + // (X509Certificate cert, String host, int port) => true; + // return client; + // }; Response response; - String date = "2024-12-17"; - var formData = - FormData.fromMap({"start": date, "order_by": 7, 'type': type ?? 1}); + String date = "2024-12-12"; + var formData = FormData.fromMap({ + "start": "2024-12-16", + "order_by": 7, + 'type': type ?? 1, + }); // "end": DateTime(2024, 12, 14).toIso8601String(), - _token = _prefs.then((SharedPreferences prefs) { + token = await _prefs.then((SharedPreferences prefs) { return prefs.getString('token') ?? ""; }); - print("SAVED TOKEN :${await _token}"); + print("SAVED TOKEN :${token}"); + + //http://192.168.2.130/konectar-staging/apiauths/logout/ try { - // dio.options.contentType = Headers.multipartFormDataContentType; - // dio.options.baseUrl = "https://cardio-staging.konectar.io/"; - - // dio.options.headers["Authorization"] = "Bearer ${newtoken}"; - response = await dio.post( - 'https://cardio-staging.konectar.io/apis/v1/events/loadFutureEvents/', + '${EventsConstants.url}${EventsConstants.eventslistapi}', options: Options( - contentType: "multipart/form-data", - followRedirects: false, - // will not throw errors + followRedirects: true, validateStatus: (status) => true, + preserveHeaderCase: true, headers: { - 'Authorization': 'Bearer ${newtoken}', + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' }), data: formData); - print("RESPONSE"); - print(response.data.toString()); + print("RESPONSE ${dio.options.headers}"); + print(response); Map jsondata = json.decode(response.data); EventsData eventresponse = EventsData.fromJson(jsondata); @@ -173,13 +185,24 @@ class ApiCall { return client; }; Response response; - var formData = FormData.fromMap( - {"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag}); + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); + var formData = FormData.fromMap({"eid": eventid, "flag": flag}); response = await dio.post( '${EventsConstants.url}${EventsConstants.followUnfollowEvent}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), queryParameters: { - "user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag, }, @@ -198,14 +221,25 @@ class ApiCall { (X509Certificate cert, String host, int port) => true; return client; }; + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); Response response; - var formData = FormData.fromMap( - {"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag}); + var formData = FormData.fromMap({"eid": eventid, "flag": flag}); response = await dio.post( '${EventsConstants.url}${EventsConstants.attendNotAttendEvent}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), queryParameters: { - "user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag, }, @@ -222,6 +256,9 @@ class ApiCall { required String endDate, required bool client, }) async { + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); print( "FORMAT_CHECK_DATE $startDate $endDate $eventid ${DateTime(2024, 12, 03).toIso8601String()}"); Dio dio = Dio(); @@ -236,7 +273,6 @@ class ApiCall { var formData; if (client) { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -245,7 +281,6 @@ class ApiCall { }); } else { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -255,7 +290,17 @@ class ApiCall { print("FORMDATA:${formData.toString()},$startDate,$endDate"); response = await dio.post( '${EventsConstants.url}${EventsConstants.specialtyOfSpeakers}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData); print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! "); @@ -275,6 +320,9 @@ class ApiCall { required String startDate, required String endDate, required bool client}) async { + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); Dio dio = Dio(); (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (HttpClient client) { @@ -286,7 +334,6 @@ class ApiCall { var formData; if (client) { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -295,7 +342,6 @@ class ApiCall { }); } else { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -305,7 +351,17 @@ class ApiCall { print("FORMDATA:${formData.toString()},$startDate,$endDate"); response = await dio.post( '${EventsConstants.url}${EventsConstants.insightsTopicsCloud}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData); print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! "); @@ -327,6 +383,9 @@ class ApiCall { required String startDate, required String endDate, required bool client}) async { + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); Dio dio = Dio(); (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (HttpClient client) { @@ -338,7 +397,6 @@ class ApiCall { var formData; if (client) { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -347,7 +405,6 @@ class ApiCall { }); } else { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "eventId": eventid, "sd": startDate, "ed": endDate, @@ -357,7 +414,17 @@ class ApiCall { print("FORMDATA:${formData.toString()},$startDate,$endDate"); response = await dio.post( '${EventsConstants.url}${EventsConstants.insightsBarChart}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData); print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! "); @@ -384,14 +451,25 @@ class ApiCall { }; Response response; var formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "event_id": eventid, }); + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); response = await dio.post( '${EventsConstants.url}${EventsConstants.eventdetailsapi}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), queryParameters: { - "user_email": "vinodh@aissel.com", "event_id": eventid, }, data: formData); @@ -415,17 +493,28 @@ class ApiCall { }; Response response; var formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "event_id": eventid, "project_id": 1, }); // "sd": "2024-07-30", // "ed": "2024-08-03", + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); response = await dio.post( '${EventsConstants.url}${EventsConstants.speakerslistapi}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), queryParameters: { - "user_email": "vinodh@aissel.com", "event_id": eventid, }, data: formData); @@ -450,15 +539,27 @@ class ApiCall { Response response; print("formdata : eventid:$eventid kolid:$kolid kid:$kid"); var formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "event_id": eventid, "kol_id": kolid, "k_id": kid, }); // "proj_kol_id": 0, + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); response = await dio.post( '${EventsConstants.url}${EventsConstants.showEventsTopicsAndSession}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), queryParameters: { "user_email": "vinodh@aissel.com", "event_id": eventid, @@ -492,10 +593,12 @@ class ApiCall { return client; }; var formData; + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); Response response; if (filename != "") { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "kol_events_id": eventid, "kol_id": kolid, "event_attendees_id": event_attendees_id, @@ -505,7 +608,6 @@ class ApiCall { }); } else { formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "kol_events_id": eventid, "kol_id": kolid, "event_attendees_id": event_attendees_id, @@ -517,7 +619,17 @@ class ApiCall { response = await dio.post( '${EventsConstants.url}${EventsConstants.saveEventsTopicNote}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData); print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! "); print(response.data.toString()); @@ -539,15 +651,26 @@ class ApiCall { return client; }; Response response; - + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); var formData = FormData.fromMap({ - "user_email": "vinodh@aissel.com", "kol_events_id": eventid, }); // "proj_kol_id": 0, response = await dio.post( '${EventsConstants.url}${EventsConstants.eventUserAnalytics}', - options: Options(), + options: Options( + followRedirects: true, + validateStatus: (status) => true, + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData); print("response user ALLSESSIONNOTES here!!!!!!!!!!!!!!!!!!!!! "); List data = []; @@ -567,7 +690,9 @@ class ApiCall { dynamic jsonResult = jsonDecode(await rootBundle.loadString("assets/api_constants.json")); //dynamic jsonResult = await MockApiCall().getConfigDataMedical(); - + String token = await _prefs.then((SharedPreferences prefs) { + return prefs.getString('token') ?? ""; + }); List responseData = apiConstantsResponseFromJson(jsonResult); print('Response_data_is: $responseData'); @@ -610,6 +735,8 @@ class ApiCall { }); try { response = await dio.post( + //'http://192.168.2.130/konectar-staging/apiauths/getVerificationCode/', + //'https://cardio-staging.konectar.io/apiauths/getVerificationCode/', '${url}${EventsConstants.loginmodule}/${EventsConstants.getVerificationCode}', options: Options(), data: formData); @@ -644,7 +771,10 @@ class ApiCall { "verification_code": code, "email_id": email, }); + print("LOGIN : API http://192.168.2.130/konectar-staging/apiauths/login"); response = await dio.post( + //'http://192.168.2.130/konectar-staging/apiauths/login', + //'http://192.168.2.130/konectar-staging/apiauths/login/', '${EventsConstants.loginUrl}${EventsConstants.login}', options: Options(), data: formData); @@ -670,7 +800,7 @@ class ApiCall { return client; }; print("email : $email,device : $deviceid"); - _token = _prefs.then((SharedPreferences prefs) { + String token = await _prefs.then((SharedPreferences prefs) { return prefs.getString('token') ?? ""; }); Response response; @@ -680,13 +810,19 @@ class ApiCall { "device_id": deviceid, }); response = await dio.post( + //'http://192.168.2.130/konectar-staging/apiauths/logout/', '${EventsConstants.loginUrl}${EventsConstants.logout}', options: Options( - contentType: "application/x-www-form-urlencoded", - followRedirects: false, - // will not throw errors + followRedirects: true, validateStatus: (status) => true, - headers: {"Authorization": "Bearer $_token"}), + preserveHeaderCase: true, + headers: { + 'Authorization': 'Bearer $token', + "Content-Type": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*', + "Accept": + 'application/json, application/x-www-form-urlencoded, multipart/form-data, */*' + }), data: formData, // queryParameters: { // "token": token, diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index 6b56ad5..6b5a1e7 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -29,7 +29,7 @@ class EventsConstants { static const String url = stagingUrl; static const String devUrl = - "http://192.168.2.130/konectar-sandbox/$moduleName/"; + "http://192.168.2.130/konectar-staging/$moduleName/"; static const String loginUrl = "https://cardio-staging.konectar.io/$loginmodule/"; diff --git a/lib/view/home.dart b/lib/view/home.dart index f6b4995..4f30def 100644 --- a/lib/view/home.dart +++ b/lib/view/home.dart @@ -185,6 +185,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { } init() async { + await ApiCall().fetchApiConstants(); await Provider.of(context, listen: false) .initConfigModules(); // await Provider.of(context, listen: false).initFiltersData(); diff --git a/lib/view/login.dart b/lib/view/login.dart index 31eeb10..4fdffaa 100644 --- a/lib/view/login.dart +++ b/lib/view/login.dart @@ -95,7 +95,7 @@ class _LoginScreenState extends State { if (!mounted) return; - deviceId = _deviceId; + deviceId = "stagingdevice123456789hhuuww"; print("DEVICE ID########################## :$deviceId"); } @@ -142,7 +142,7 @@ class _LoginScreenState extends State { List _buildBody(Orientation orientation, LoginProvider provider) { return [ SizedBox( - height: 10, + height: 40, ), SvgPicture.asset( "assets/images/konectar_logo.svg", @@ -152,29 +152,9 @@ class _LoginScreenState extends State { flex: 2, child: Center( child: Container( - // decoration: const BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.topRight, - // end: Alignment.bottomLeft, - // colors: [ - // Color.fromARGB(255, 126, 134, 147), - // Color.fromARGB(255, 193, 198, 209), - // Color.fromARGB(255, 214, 217, 223), - // ], - // )), padding: EdgeInsets.symmetric( horizontal: 30, vertical: orientation == Orientation.portrait ? 20 : 0), - // decoration: const BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.topRight, - // end: Alignment.bottomLeft, - // colors: [ - // Color.fromARGB(255, 126, 134, 147), - // Color.fromARGB(255, 193, 198, 209), - // Color.fromARGB(255, 214, 217, 223), - // ], - // )), child: _buildform(provider), ), ), @@ -246,8 +226,8 @@ class _LoginScreenState extends State { labelStyle: TextStyle(fontSize: isTablet ? 18.0 : 16), labelText: "Domain", hintStyle: TextStyle(fontSize: isTablet ? 18.0 : 16), - prefix: Text("https://"), - suffix: Text(".io/"), + prefix: Text("https:// "), + suffix: Text(" .konectar.io/"), hintText: "Enter your Domain"), ), ), @@ -290,14 +270,13 @@ class _LoginScreenState extends State { provider.loading = true; }); print("email:${emailTextController.text}"); - print("FIRST LOGIN"); if (!provider.showCodeField) { provider.email = emailTextController.text; // String encoded = // base64.encode(utf8.encode(deviceId)); String domain = - "https://${domainTextConrtroller.text}.io/"; + "https://${domainTextConrtroller.text}.konectar.io/"; var resp = await provider.verifyEmail(domain, emailTextController.text, deviceId!, platform); if (resp != null) { @@ -377,50 +356,24 @@ class _LoginScreenState extends State { secretKeyTextConrtroller.text = provider.code!; }); } - - // } - - //_joinMeeting(roomText.text, "demo meet2"); - // _saveprefs( - - // emailTextController.text, - - // true) - // .then((value) { - // Navigator.of(context).pushReplacement( - // MaterialPageRoute( - // builder: (context) => FirebaseExample( - // title: secretKeyTextConrtroller.text, - // )), - // ); - // } - // ); } else { _displaySnackBar(textFieldsValidation(provider)); } }, - // onPressed: () async { - // await ApiCall().fetchApiConstants().then( - // (value) { - // Navigator.of(context).pushReplacement( - // MaterialPageRoute( - // builder: (context) => NavigationHomeScreen()), - // ); - // }, - // ); - // }, textColor: Colors.white, fontsize: isTablet ? 22 : 18, - title: provider.showCodeField ? "Verify" : "Sign In"), + title: provider.showCodeField ? "Verify Code" : "Sign In"), ), SizedBox( height: 10, ), - provider.showMessage - ? Text(provider.message!) - : provider.loading - ? Center(child: CircularProgressIndicator()) - : SizedBox.shrink(), + Center( + child: provider.showMessage + ? Text(provider.message!) + : provider.loading + ? Center(child: CircularProgressIndicator()) + : SizedBox.shrink(), + ), ]), ); } @@ -458,16 +411,11 @@ class _LoginScreenState extends State { return isloggedout; }); }); - // await SessionManager().setLoggedIn(isloggedin); - // UserData userData = - // UserData(email: email, name: token, domainUrl: domain, secretkey: key); - // await provider.saveUserData(userData); } _displaySnackBar(String msg) { final snackBar = SnackBar(content: Text(msg)); ScaffoldMessenger.of(context).showSnackBar(snackBar); - //scaffoldKeyLogin.currentState!.showSnackBar(snackBar); } String textFieldsValidation(LoginProvider provider) { diff --git a/lib/view/login_components/care_view.dart b/lib/view/login_components/care_view.dart index 321bf43..6f82d83 100644 --- a/lib/view/login_components/care_view.dart +++ b/lib/view/login_components/care_view.dart @@ -82,6 +82,20 @@ class CareView extends StatelessWidget { // // width: MediaQuery.of(context).size.width, // // height: MediaQuery.of(context).size.height, // ), + Align( + alignment: Alignment.centerRight, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(100), + topLeft: Radius.circular(100)), + color: const Color.fromARGB(255, 167, 203, 234), + shape: BoxShape.rectangle, + ), + height: MediaQuery.of(context).size.height / 2, + width: MediaQuery.of(context).size.width / 4, + ), + ), Container( padding: const EdgeInsets.only(bottom: 100), child: Column( diff --git a/lib/widgets/home_drawer.dart b/lib/widgets/home_drawer.dart index 5e2de2d..e7d7970 100644 --- a/lib/widgets/home_drawer.dart +++ b/lib/widgets/home_drawer.dart @@ -279,7 +279,7 @@ class _HomeDrawerState extends State { child: ListView.builder( physics: const BouncingScrollPhysics(), padding: const EdgeInsets.all(0.0), - itemCount: drawerList?.length, + itemCount: drawerList?.length ?? 0, itemBuilder: (BuildContext context, int index) { return inkwell(drawerList![index]); }, diff --git a/pubspec.lock b/pubspec.lock index 567d011..036afa0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" connectivity_plus: dependency: "direct main" description: @@ -892,18 +892,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -1340,7 +1340,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" sliver_tools: dependency: transitive description: @@ -1401,10 +1401,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" state_notifier: dependency: transitive description: @@ -1433,10 +1433,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" syncfusion_flutter_charts: dependency: "direct main" description: @@ -1489,10 +1489,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" textfield_tags: dependency: "direct dev" description: @@ -1641,10 +1641,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: