import 'package:flutter_provider_demo/model/car_model.dart'; class CarDao { /// get cars from sqlite static Future> getCars() async { return [ CarModel(id: 1, brand: "大众", type: "朗逸"), CarModel(id: 2, brand: "大众", type: "帕萨特"), ]; } /// add car to sqlite /// @param car /// @return /// @throws Exception static Future addCar(CarModel car) async { return 0; } /// delete car from sqlite /// @param car /// @throws Exception static Future deleteCar(CarModel car) { return Future.value(true); } }