I assigned file path to a variable and tried to pass it to require function but it's not accepting it!
If require not accepting variable as parameter then how I'll give it?
you should try importing the image like so:
import iconPath from './united-kingdom.png';
and then you can use it like this:
source={iconPath}