Romantic spark can happen instantly or over time. It has often developed after platonic relationships and it has very often happened immediately two people have chatted for a short while, a bit like a drag car spinning its wheels without moving, then some smoke and then whoosh.
Chemistry or spark is just a mutual feeling for two people where each is admiring the other and it is usually correct. You can meet lots of people, some nice, some boring, some egotistical until you meet one which sparks some interest. If it is mutual the spark becomes a flame.