Soak dried figs in warm water for 1-2 hrs until they swell and become soft.
In the same pan, add figs and dates and cook them at low temperature, for about 10 minutes. Keep stirring and turning the mixture.
They will get softened, release their moisture slowly, and lose their shape.
At the stage when the mixture becomes uniform, starts getting together into a lump, add in the roasted almonds and walnuts, and mix well (better use 2 spatulas).
You may also add other dry fruits like Pistachios, Pinenuts or Cashews to the barfi as per your liking.