Cannot connect to mobile_client_flutter from GRANDStack starter NodeJs server

Hi all,
So i am trying to get the GRANDStack starter up and running.
So far i have got the server up and running by using this guide

This is my .env file in the API directory:

This is the URL that is started up when i run "npm run start"

http://localhost:4001/graphql

When i connect to the app using the built in mobile_client_flutter project i get a connection error

Here is the error within the app

Any advice and help would be appreciated

Thanks

Hello @asim1999 .

Start by installing universal_platform package in the pubspec.yaml file.

And import the package to the file where you're declaring the url.

import 'package:universal_platform/universal_platform.dart';

And now make sure your URL looks like this.

String url = UniversalPlatform.isAndroid
      ? 'http://your_ip_address:4001/graphql'
      : 'http://localhost:4001/graphql';

change your_up_adress with your actual IP address eg; (192.168. 1.1).
Good luck.