Questions tagged [aqueduct]

Aqueduct is an open-source, server-side framework written in Google’s Dart language.

Major Features


  1. HTTP Request Routing.
  2. Multiple CPU support, without adding complicated multi-threading logic.
  3. CORS Support.
  4. Automatic OpenAPI specification/documentation generation.
  5. OAuth 2.0 implementation.
  6. Fully-featured ORM, with clear, type- and name-safe syntax, and SQL 6. Join support. (Supports PostgreSQL by default.)
  7. Database migration tooling.
  8. Template projects for quick starts.
  9. Integration with CI tools. (Supports TravisCI by default.)
  10. Integrated testing utilities for clean and productive tests.
  11. Logging

Tutorials


Need a walkthrough? Read the tutorials. They take you through the steps of building an Aqueduct application.

Documentation


You can find the API reference here. You can find in-depth guides and tutorials here.

139 questions
2
votes
1 answer

sign in The method '_mulFromInteger' was called on null

I've got sign in methode in my provider. Future signIn( String email, String password, BuildContext context) async { SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); final clientID =…
delmin
  • 2,330
  • 5
  • 28
  • 54
2
votes
1 answer

Passing user id with AuthController

I just made simple authentication app using aqueduct as a back end. I used codes from aqueduct documentation pages for login and registering. When I login with this code in backend router .route('/auth/token') .link(() =>…
delmin
  • 2,330
  • 5
  • 28
  • 54
2
votes
1 answer

How to get filename in multipart post request using Dart/Aqueduct

I am trying to upload image from client (flutter) to server (Aqueduct.io) using MultipartRequest. It's working, but currently file names are assigned the current time, how can I pass the filename from a client and parse it on a server side? Client…
Timur
  • 111
  • 1
  • 11
2
votes
2 answers

Aqueduct: Bad state: No entity found for '_MyEntity'. Did you forget to create a 'ManagedContext'?

I'm getting started on a new project and want to use test driven development.This is my entity: import 'package:aqueduct/aqueduct.dart'; class MyEntity extends ManagedObject<_MyEntity> implements _MyEntity {}class _MyEntity { @primaryKey int…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2
votes
1 answer

How to get a refresh token from an Aqueduct server

The Aqueduct docs say that the server should return a refresh token. It should look like this: { "access_token" : "Abca09zzzza2o2kelmzlli3ijlka", "token_type" : "bearer", "refresh_token" : "lkmLIAmooa898nm20jannnnnxaww", "expire_in" :…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2
votes
0 answers

Relate as a primary key in Aqueduct for 'is a' relationship

I'm trying to model a isA relationship with Aqueduct. It is a one-to-one relationship but I need to make the @Relate column the primary key, however I cannot set both a @Relate and @Column tag. What would be the way to do this ? Let's say I have a…
Thibaut
  • 21
  • 2
2
votes
1 answer

How create a persistentStore to MySQL with Aqueduct?

I'm trying to create a context with dataModel and persistentStore... Follow the code below working with PostgreSQL: @override Future prepare() async { logger.onRecord.listen((rec) => print("$rec ${rec.error ?? ""} ${rec.stackTrace ??…
Leonardo Severo
  • 470
  • 5
  • 13
2
votes
1 answer

createdAt updatedAt aqueduct

In mongoose, there's the timestamp: true option to a schema, which auto-populates a createdAt and updatedAt for any model item added. Is there something similar in Aqueduct? If not, how do I manually do so? I currently tried this, which is failing,…
KhoPhi
  • 9,660
  • 17
  • 77
  • 128
2
votes
1 answer

How to get the request header in a Dart Aqueduct server

I want to get a token from the Authorization header of the request. import 'dart:async'; import 'package:aqueduct/aqueduct.dart'; class SecretController extends ResourceController { @Operation.get() Future signin() async { …
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2
votes
0 answers

"Bad state: Future already completed" in Aqueduct

I'm attempting to, in the prepare method of the main channel, load up an AutoRefreshingAuthClient and subsequently a FirestoreAPI object, but I am getting the following stack trace: Unhandled exception: Bad state: Future already completed #0 …
glotchimo
  • 664
  • 5
  • 23
2
votes
1 answer

The method 'didAddToChannel' was called on null

When I start the server I receive this error NoSuchMethodError: The method 'didAddToChannel' was called on null. Receiver: null Tried calling: didAddToChannel() this is my code @override Controller get entryPoint { final router =…
Siloé Bezerra Bispo
  • 2,056
  • 1
  • 17
  • 31
2
votes
1 answer

Flutter - Pass a Future List to a SearchDelegate

I've been following a Flutter Search tutorial on the - boring flutter show . I have been trying to implement the same functionality using a list which is derived from a Future List where the data comes from an api (in this case and Aqueduct…
Jake Anderson
  • 309
  • 1
  • 4
  • 18
2
votes
0 answers

How to filter Query by nested join in Aqueduct 3?

I have models (simplify): class _User { int id; @Relate(#users) Currency currency; } class _Currency { int id; ManagedSet prices; ManagedSet users; } class _Price { int id; @Relate(#prices) …
2
votes
1 answer

How to enable SQL logging in Aqueduct 3?

It would be very useful for me to see in the terminal what requests are executed and how long they take. Logging of HTTP requests works fine, but I did not find a similar function for SQL. Is there a way to enable logging globally using config.yaml…
2
votes
1 answer

Aqueduct controller subrouting

Is there any possibility to subroute in Aqueduct controller? router.route("/userApi").link(() => UserController(context)); class UserController extends ResourceController { @Operation.post("/login") Future login(@Bind.body() IdWrap…
Zdeněk Mlčoch
  • 722
  • 6
  • 17
1
2
3
9 10