Generally speaking, agreeing to treat someone to a meal and then reneging on that offer is not against the law.
The mainstream view in civil law considers that gratuitous agreements to treat someone to a meal or to offer someone a free ride are both part of a beneficent relationship. A beneficent relationship refers to an arrangement where the parties involved have no intention of establishing a legal relationship of rights and obligations. Instead, one party acts out of good morals to benefit the other, with actions intended to foster goodwill and friendship.
The agreements formed within a beneficent relationship do not possess monetary value, and the actions do not constitute a declaration of intent to establish contractual rights for others or contractual obligations for themselves. Therefore, no contractual relationship is established between the two parties.
If one party agrees to treat another to a meal or offer a free ride and later changes their mind, this does not constitute a breach of contract in the legal sense, and they are not required to bear any liability for breach of contract.
Of course, although it may not constitute a breach of contract in legal terms, from a perspective of basic values and morality, such behavior would certainly be considered a violation of an agreement, and you will probably find yourself back to single status.