Category : flutter

final String url = ‘http://10.0.2.2:8000/api/promosis/abc’; Future read() async { var response = await http.get(Uri.parse(url)); var data = json.decode(response.body)["data"]; return data; } how to rebuild the future builder when i pressed a button and define my new url ‘http://10.0.2.2:8000/api/promosis’, i am thinking about recall the page but this not true, there is must be any good ..

Read more

I am using Laravel for my back end and Flutter for my front end. When the token is stored, I use my local storage: localStorage.setString(‘token’,json.encode(body[‘access_token’])); This works OK. BUT when I try to get it back from localStorage using: token = localStorage.getString(‘token’); Then the token will be returned in the following format: "eyJ0eXAiOiJKV1[…]a0" where the ..

Read more

Im kind of new to stack so pardon my way of asking.. Actually Im running a flutter application with a Laravel backend and recently made a signup method in the application where the user clicks on the signup arrow but upon clicking I receive this error(something about a JWT) /flutter (19842): {message: LcobucciJWTSignerHmac::createHash(): Argument #2 ..

Read more

So I have made an encryption middleware in laravel that encrypts data using the following code public function handle($request, Closure $next) { return response()->json(encrypt($response->content()),$response->status()); } I ran the command php artisan:generate key So now I’m trying to decrypt this data from flutter I tried using encrypt package in flutter but still no luck in making ..

Read more

i’m a beginner and i have a strange errori got a problem in visibility i work with laravel api if i have no products in database this.widget.client always false , if i have a product in database the application works perfectly !! flutter code : bool client=false ; _getAuthenticatedUser() async { SharedPreferences _prefs = await ..

Read more

i’m a beginner and i tried to make crud , so how to update a user without changing his photo because if i pass a photo the update works perfectly but if i didn’t pass the photo i got Exception:Invalid image data and the value of photo change in database. here is my laravel code ..

Read more