First designs for ui
This commit is contained in:
@@ -2,22 +2,15 @@ import 'package:fotodocumentation/controller/base_controller.dart';
|
||||
import 'package:fotodocumentation/dto/customer_dto.dart';
|
||||
|
||||
abstract interface class PictureController {
|
||||
Future<PictureDto?> get({required int id});
|
||||
Future<bool> delete(PictureDto dto);
|
||||
}
|
||||
|
||||
class PictureControllerImpl extends BaseController implements PictureController {
|
||||
final String path = "picture";
|
||||
|
||||
@override
|
||||
Future<PictureDto?> get({required int id}) {
|
||||
String uriStr = '${uriUtils.getBaseUrl()}$path/$id';
|
||||
return runGetWithAuth(uriStr, (json) => PictureDto.fromJson(json));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> delete(PictureDto dto) {
|
||||
// TODO: implement delete
|
||||
throw UnimplementedError();
|
||||
String uriStr = '${uriUtils.getBaseUrl()}$path/${dto.id}';
|
||||
return runDeleteWithAuth(uriStr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user