github.com/hsfzxjy/dgo/go@v0.2.0/dart_stream_callback.go (about) 1 package dgo 2 3 type DartStreamCallback DartCallback 4 5 func (dcb DartStreamCallback) specialInt() {} 6 7 func (dcb DartStreamCallback) Add(value any) bool { 8 return DartCallback(dcb). 9 Flag(CF_WITHCONTEXT | cf_stream_value). 10 Call(value) 11 } 12 13 func (dcb DartStreamCallback) AddError(err error) bool { 14 return DartCallback(dcb). 15 Flag(CF_WITHCONTEXT | cf_stream_error). 16 Call(err.Error()) 17 } 18 19 func (dcb DartStreamCallback) Done() bool { 20 return DartCallback(dcb). 21 Flag(CF_POP | CF_WITHCONTEXT | CF_FAST_NIL). 22 Call() 23 }