SSE: Stopping/Cancelling implementation

This commit is contained in:
Manas Hejmadi
2025-06-26 00:36:12 +05:30
parent 97db38a42d
commit 882b393fdd
8 changed files with 119 additions and 95 deletions

View File

@@ -17,6 +17,7 @@ void main() {
home: Scaffold(
body: SendButton(
isWorking: false,
isStreaming: false,
onTap: () => sendPressed = true,
onCancel: () => cancelPressed = true,
),
@@ -46,6 +47,7 @@ void main() {
home: Scaffold(
body: SendButton(
isWorking: true,
isStreaming: false,
onTap: () => sendPressed = true,
onCancel: () => cancelPressed = true,
),
@@ -74,6 +76,7 @@ void main() {
builder: (context, setState) {
return Scaffold(
body: SendButton(
isStreaming: false,
isWorking: isWorking,
onTap: () => setState(() => isWorking = true),
onCancel: () => setState(() => isWorking = false),