You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
481 B
13 lines
481 B
import 'package:akuCommunity/constants/api.dart';
|
|
import 'package:akuCommunity/model/user/house_model.dart';
|
|
import 'package:akuCommunity/utils/network/base_model.dart';
|
|
import 'package:akuCommunity/utils/network/net_util.dart';
|
|
|
|
class HouseFunc {
|
|
static Future<List<HouseModel>> get houses async {
|
|
BaseModel model = await NetUtil().get(API.user.houseList);
|
|
if (!model.status) return [];
|
|
return (model.data as List).map((e) => HouseModel.fromJson(e)).toList();
|
|
}
|
|
}
|