我使用了Sqflite。如何在不显示的情况下读取SQLite数据?我只需要与用户输入数据进行比较?
DatabaseHandle.dart
Future<List<Url>> getUrl() async{
var db_connection = await db;
List<Map> list = await db_connection.rawQuery("SELECT uniform_resource_locator FROM Url Limit 1");
List<Url> urls = List();
for(int i = 0; i < list.length; i++){
Url url = Url();
// url.id = list[i]['id'];
url.uniform_resource_locator = list[i]['uniform_resource_locator'];
urls.add(url);
}
return urls;
}