getChapterDataByChapterId function Null safety
- String chapterId
Implementation
Future<SingleChapterData> getChapterDataByChapterId(String chapterId) async {
var unencodedPath = '/at-home/server/$chapterId';
var response = await http.get(Uri.https(authority, unencodedPath));
var result = SingleChapterData.fromJson(jsonDecode(response.body));
return result;
}