Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

Conversation

@binSaed
Copy link

@binSaed binSaed commented Apr 29, 2020

old code
router.route("/path").linkFunction((req) {
req.attachments["key"] = "value"; //here u forget to return reqast
}).linkFunction((req) {
return Response.ok({"key": req.attachments["value"]});//in first linkFunction u add key with name "key"
});

router
    .route("/path")
    .linkFunction((req) => req..attachments["key"] = "value")
    .linkFunction((req) => Response.ok({"key": req.attachments["key"]}));

old code 
router.route("/path").linkFunction((req) {
  req.attachments["key"] = "value"; //here u forget to return reqast 
}).linkFunction((req) {
  return Response.ok({"key": req.attachments["value"]});//in first linkFunction u add key with name "key" 
});

    router
        .route("/path")
        .linkFunction((req) => req..attachments["key"] = "value")
        .linkFunction((req) => Response.ok({"key": req.attachments["key"]}));
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant