In smart cities, the end users should play an active role to provide the flexibility services in demand response programmes of smart distribution grids. Moreover, electric vehicles (EVs), their main task being providing green transportation, can play an important role in providing distributed energy in smart cities. In this study, a stochastic problem is presented to manage flexibility of end users and charging operation of EVs in the distribution grid. Thus, the end-users, aggregators, and EVs are defined as players in the proposed problem. Additionally, three strategies are presented to manage energy centralised, decentralised, or pseudo-decentralised in the proposed stochastic problem. In the decentralised and pseudo-decentralised approaches, flexibility of consumers is managed autonomously. On the other hand, EVs are utilised independently by their corresponding owners only in the decentralised approach. Also, a 33-bus distribution network is considered to assess the performance of the proposed strategies regarding the expected costs of players and the impact of flexibility on transacted energy through aggregators, and the real-time market. On the basis of simulation results, it is concluded that decentralised strategy to manage energy flexibility and charging operation of EVs by the end users is the win-win strategy for end users and aggregators.