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
22
votes
7 answers

How can I convert string to utf8 in Dart?

I am using aqueduct web api framework to support my flutter app. In my api backend I need to connect local network socket services. My problem is that I can't return the exact string (in tr). So, How can I convert string to utf8 in…
user9239214
13
votes
4 answers

zsh: command not found: pub

I'm getting this error message when try to install aqueduct on macOS Catalina with this command. pub global activate aqueduct I managed to install it by putting flutter in front of it but now I cannot run aqueduct. I tried aqueduct --version I…
delmin
  • 2,330
  • 5
  • 28
  • 54
8
votes
1 answer

Error 'A value of type 'dynamic' can't be assigned to a variable of type 'String'.' in Dart 2.2

since the last dart update (2.2) I'm getting this error, 'A value of type 'dynamic' can't be assigned to a variable of type 'String'.' which doesn't make much sense to me. the code is absolutely trivial: class EmployeeMirror { …
Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85
5
votes
4 answers

Aqueduct db generate error: Bad state: NoSuchMethodError: The getter 'length' was called on null

On the system: Dart VM version: 2.9.0-14.0.dev.flutter-2b917f5b6a (be) (Wed Jun 10 15:46:47 2020 +0000) on "windows_x64" It is OK when run "aqueduct db generate" to create 00000001_initial.migration.dart But, after edit models and rerun "aqueduct db…
Tony
  • 51
  • 1
  • 2
4
votes
2 answers

How can I deploy aqueduct application to web hosting plan using cpanel?

HI im very new to back end and Im learning aqueduct since I know dart programming. My question is how can I deploy the aqueduct to my webserver? I have a hosting plan to a2hosting which Im currently using for my wordpress site and I wonder if I can…
David B.
  • 521
  • 1
  • 6
  • 18
4
votes
2 answers

How to sum items in a List in Dart

What's the best way to sum all the "amounts" of all "expenses", for each user? I've tried a few different things but I can't quite get it right. It should return 2 values: 20.0 and 24.90 [ { "id": 3, "company": { "id": 2 }, …
Lee
  • 1,389
  • 3
  • 18
  • 28
4
votes
1 answer

Flutter (Dart) Looping through JSON results - .length returns 0

I'm new to flutter and after some good progress got stuck on what i though should be a simple loop. I'm able to show a single result from the json, but unable to display them all. for(var i = 0; i < snapshot.data.posts.length; i++){ return…
Jake Anderson
  • 309
  • 1
  • 4
  • 18
3
votes
1 answer

Cannot create a aqueduct project

This is the error I get when I run aqueduct create project. Aqueduct is activated. -- Aqueduct CLI Version: 3.3.0+1 *** Uncaught error Bad state: No element **** Stacktrace * #0 ListMixin.firstWhere (dart:collection/list.dart:150:5) *…
hamza
  • 31
  • 2
3
votes
2 answers

How to downgrade Dart with Homebrew

I'm on a Mac and I upgraded to Dart 2.8 from Dart 2.7.1 by running brew upgrade dart as it describes in the documentation. However, version 2.8 contains some breaking changes for the Aqueduct framework, so I want to downgrade to Dart 2.7.2. I tried…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
3
votes
1 answer

Flutter and PostgreSQL

Excuse me asking maybe silly/dumb I'm Rookie self-taught developer I trying to get my flutter app to work with my PostgreSQL database Unforturnly I couldn't find anything related to Getting Flutter and postgreSQl to work togeather All I can find…
Fool Baby
  • 178
  • 2
  • 10
3
votes
1 answer

Aqueduct ORM multiple nested joins

I am using Aqueudct ORM with data models like so: A | (one-one) B / | \ (all many-one) C C C and my Tables look like so: class _A { B b; } class _B { @Relate(#c1Ref) C c1; @Relate(#c2Ref) C c2; @Relate(#c3Ref) C…
Vedavyas Bhat
  • 2,068
  • 1
  • 21
  • 31
3
votes
1 answer

How to logout (ie, revoke, delete, or invalidate the tokens) for a user on an Aqueduct server?

I know how to implement a route to register a user and also how to trade user credentials in for an access token. These are both covered in the official tutorial. How do you invalidate the access token (and refresh token) for a registered user.…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
3
votes
2 answers

Optional query params aqueduct

Went through the documentation, couldn't find any. How does one make an optional query param in aqueduct?
KhoPhi
  • 9,660
  • 17
  • 77
  • 128
3
votes
1 answer

Many to many query joins in aqueduct

I have A -> AB <- B many to many relationship between 2 ManagedObjects (A and B), where AB is the junction table. When querying A from db, how do i join B values to AB joint objects? Query query = await Query(context) ..join(set: (a) =>…
2
votes
2 answers

RangeError: Invalid value: Not in range 0..1114111, inclusive: -1 when trying to use upgrade command

aqueduct db upgrade.... -- Aqueduct CLI Version: 3.3.0 -- Aqueduct project version: 3.3.0-b1 *** Uncaught error RangeError: Invalid value: Not in range 0..1114111, inclusive: -1 **** Stacktrace * #0 StringBuffer.writeCharCode…
khalid alsaleh
  • 173
  • 1
  • 7
1
2 3
9 10