getRestaurants method

Future<List<SocialFeed>> getRestaurants()

Implementation

Future<List<SocialFeed>> getRestaurants() async {
  final jsonString =
      await rootBundle.loadString('assets/data/restaurants.json');
  final jsonList = json.decode(jsonString) as List<dynamic>;
  return jsonList.map((json) => SocialFeed.fromJson(json)).toList();
}