Category : flutter

I try to get data from an API made in laravrel to the flutter app when the function is called to do the request but throw an error the flutter code import ‘package:http/http.dart’ as http; import ‘api_help.dart’; class TypesApi { // ignore: non_constant_identifier_names get_all_types() async{ String types = ApiHelp.main_api_url ; Map<String,String> headers = { ‘Accept’ ..

Read more

In my application, I get a validation error when selecting a time from 1 to 9, which is one digit. The source code is: $validator = Validator::make($request->all(), [ ‘service_id’ => ‘required|integer|exists:services,id’, ‘origin’ => ‘required|string|latlng’, ‘destination’ => ‘required|string|latlng’, ‘date’ => ‘required|date_format:Y-m-d|after_or_equal:today’, ‘time’ => ‘required_with:date|date_format:H:i’.($request->get(‘date’) == Carbon::today()->format(‘Y-m-d’) ? ‘|after:’.Carbon::now()->format(‘H:i’) : ”) ]); and i get this error ..

Read more

I use laravel to do admin panel(website) and flutter mobile app with laravel api. I plan to use AWS EC2 to host my application. After creating an instance and setup laravel environment. What should I do for flutter file? Can someone show me how to host my application in this situation? Or do you have ..

Read more

I made a flutter program to download pdf files from laravel. I get an error when I press the download button. Exception has occurred. HandshakeException (HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:354))) Here is my download function : Future<File> _downloadFile() async{ final res = await Network().download("/letter/download/${surat.id_surat}"); var bytes ..

Read more

its work in post manthis is a function to send data to restful api addProduct( String name, String description, String salary, String available, String categoryId, String timeToPreparation, String calories, File photo) async { final pref = await SharedPreferences.getInstance(); final key = ‘token’; final value = pref.get(key) ?? 0; String url = "Url"; final response = ..

Read more

I have this controller which give me pagination result : public function leaders() { $predects = Predect::groupBy(‘user_id’)->selectRaw(‘ user_id ,SUM(point) as points’)->orderBy(‘points’,’desc’)->paginate(20); $counter = 0; foreach($predects as $predect){ $counter++; $predect->counter=$counter; $predect->username=$predect->User->username; unset($predect->User); } return $predects; } I get all things ok just $counter ,I want to be contiuosly on pagination ,for each page it is start ..

Read more

I’m using Beyondco Larevel Websockets on my Laravel Backend, and using pusher_client and laravel_echo on my Flutter frontend. I’ve been trying to connect from my ios simulator into my Laravel Backend host, which is using valet secure, but failing. My Flutter connections: PusherClient getPusherClient(String token) { PusherOptions options = PusherOptions( host: ‘my-local-server.test’, wsPort: 6001, wssPort: ..

Read more

I am building a Flutter mobile application and want to implement targeted push notifications based on the user’s preferences. Currently, I can send notifications to everyone (by registering the app to a single topic I have, and then I said notifications to that topic), which means everyone gets the same notification. What I want to ..

Read more