mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-18 02:04:18 +01:00
app list show as desc
This commit is contained in:
@@ -8,7 +8,8 @@ class AppDB {
|
|||||||
static Future<List<App>> all() async {
|
static Future<List<App>> all() async {
|
||||||
List<App> objs = [];
|
List<App> objs = [];
|
||||||
var db = await DB.getCurrentDatabase();
|
var db = await DB.getCurrentDatabase();
|
||||||
List<Map<String, dynamic>> list = await db.rawQuery("select * from app");
|
List<Map<String, dynamic>> list =
|
||||||
|
await db.rawQuery("select * from app order by updated_at desc");
|
||||||
for (var i = 0; i < list.length; i++) {
|
for (var i = 0; i < list.length; i++) {
|
||||||
var json = list[i];
|
var json = list[i];
|
||||||
objs.add(App.fromJson(json));
|
objs.add(App.fromJson(json));
|
||||||
|
|||||||
Reference in New Issue
Block a user