Skip to content

Commit

Permalink
info alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
miakh committed Jul 23, 2023
1 parent f9d4abd commit 6518fed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/services/DataService.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ class DataService {
}

static Future<List<InformationModel>> getInformation() async {
var data = await _supabase.from('information').select();
return List<InformationModel>.from(data.map((x) => InformationModel.fromJson(x)));
var data = await _supabase.from("information").select();
var infoList = List<InformationModel>.from(data.map((x) => InformationModel.fromJson(x)));
infoList.sortBy((element) => element.title.toLowerCase());
return infoList;
}

static Future<dynamic> getEvents() async =>
Expand Down

0 comments on commit 6518fed

Please sign in to comment.