This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
class Circle { | |
double? radius; | |
String? color; | |
Circle() | |
: radius = 1, | |
color = 'red'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void createInfoAlert({ | |
List<String>? videos, | |
String? audio, | |
List<String>? images, | |
required int alertCategoryId, | |
required String headline, | |
required String body, | |
required String location, | |
double? longitude, | |
double? latitude, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Base url: https://alert-lumen-api.herokuapp.com/api/ | |
2. Google sign up url: register/google-live | |
we tested on postman, we get the error below : | |
{ | |
"message": "", | |
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException", | |
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php", | |
"line": 43, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//geocoding base url | |
static const String geocodingBaseUrl = "https://maps.googleapis.com/maps/api/geocode/json"; | |
static const String googlePlaceDetailsBaseUrl = "https://maps.googleapis.com/maps/api/place/details/json"; | |
//convert lat, lng to address, sessionToken can be ignored, used to group requests for easier tracking in google console | |
Future<Map<String, dynamic>> reverseGeoCode(String latitude, String longitude, | |
String sessionToken) async { | |
Uri requestUrl = | |
Uri.parse("${geocodingBaseUrl}?latlng=$latitude,$longitude" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget SlideOrTapToRate(){ | |
return SizedBox( | |
width: 400, | |
child: GestureDetector( | |
onHorizontalDragStart: (dragStart) { | |
setState(() { | |
offset = 0; | |
selectedStar = -1; | |
}); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///The error | |
Expected: [ | |
AuthenticationState:AuthenticationState(RequestStatus.initial, RequestStatus.loading, RequestStatus.initial, null, null, null, null), | |
AuthenticationState:AuthenticationState(RequestStatus.initial, RequestStatus.failed, RequestStatus.initial, null, An unknown error has occurred, null, null) | |
] | |
Actual: [ | |
AuthenticationState:AuthenticationState(RequestStatus.loading, RequestStatus.initial, RequestStatus.initial, null, null, null, null), | |
AuthenticationState:AuthenticationState(RequestStatus.failed, RequestStatus.initial, RequestStatus.initial, null, An unknown error has occurred, null, null) | |
] | |
Which: at location [0] is AuthenticationState:<AuthenticationState(RequestStatus.loading, RequestStatus.initial, RequestStatus.initial, null, null, null, null)> instead of AuthenticationState:<AuthenticationState(RequestStatus.initial, RequestStatus.loading, RequestStatus.initial, null, null, null, null)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:dio/dio.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_dotenv/flutter_dotenv.dart'; | |
import 'package:path/path.dart'; | |
import '../model/cloudinary_upload_model.dart'; | |
import '../utils/app_constants.dart'; | |
import '../utils/utility.dart'; | |
Future<NetworkResponse> uploadAssets( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is the chat model that is been used to test | |
{ | |
"status": true, | |
"chat": { | |
"_id": "665317595782332ba2ce6d5a", | |
"user": "66224c1282d7be208a239fb6", | |
"merchant": "6651fa0606acda67b9ec699d", | |
"deleted": false, | |
"createdAt": "2024-05-26T11:04:57.572Z", |