0

I want to Secure my API Key and I don't want to hardcode them in code like in image given below because anyone can decomplile app & get my secret key enter image description here

is there ant Better Way to do this

Abhishek Ghimire
  • 1,031
  • 2
  • 4
  • 8
  • Read this answser https://stackoverflow.com/questions/64527430/how-to-protect-flutter-app-from-reverse-engineering/64543495#64543495 very intersting – manic Feb 19 '22 at 13:46

1 Answers1

0

In order to not expose the API key client side, you need a backend solution. Firebase cloud functions work well with Flutter. You call your backend function which uses the newsapi and returns the results back to Flutter.

August Kimo
  • 1,075
  • 5
  • 15