Take Picture Example

 

Take Picture Example

If you send a payload such as {'name': 'camera.takePicture'} as part of your request, you must encode the body as JSON. You can use json.encode(your-payload-object) or the new jsonEncode() https://api.dart.dev/stable/2.7.1/dart-convert/jsonEncode.html

take picture

Test from THETA SC2. OK!

Response from SC2 shown below.

C:\Users\craigdev\Development\personal\dart>dart bin/main.dart
[]
200
{
  "name": "camera.takePicture",
  "id": "1588",
  "progress": {
    "completion": 0.0
  },
  "state": "inProgress"
}