Added Streams to TourRepository
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:hl_lieferservice/dto/contact_person.dart';
|
||||
import 'package:hl_lieferservice/dto/delivery.dart';
|
||||
import 'package:hl_lieferservice/dto/image.dart';
|
||||
import 'package:hl_lieferservice/dto/image_note_response.dart';
|
||||
import 'package:hl_lieferservice/dto/note.dart';
|
||||
import 'package:hl_lieferservice/dto/note_template.dart';
|
||||
import 'package:hl_lieferservice/model/tour.dart';
|
||||
@ -87,24 +90,26 @@ class Discount {
|
||||
}
|
||||
|
||||
class ImageNote {
|
||||
const ImageNote({
|
||||
ImageNote({
|
||||
required this.name,
|
||||
required this.url,
|
||||
required this.objectId,
|
||||
this.data
|
||||
});
|
||||
|
||||
final String name;
|
||||
final String url;
|
||||
final String objectId;
|
||||
Uint8List? data;
|
||||
|
||||
factory ImageNote.fromDTO(ImageDTO dto) {
|
||||
factory ImageNote.fromDTO(ImageNoteDTO dto) {
|
||||
return ImageNote(name: dto.name, url: dto.url, objectId: dto.oid);
|
||||
}
|
||||
|
||||
factory ImageNote.make(String objectId, String name) {
|
||||
factory ImageNote.make(String objectId, String name, Uint8List? bytes) {
|
||||
String url = "/v1/preview/1920_1080_100_png/$objectId";
|
||||
|
||||
return ImageNote(name: name, url: url, objectId: objectId);
|
||||
return ImageNote(name: name, url: url, objectId: objectId, data: bytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user