aqueduct

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

这一生的挚爱 提交于 2021-01-22 07:50:08
问题 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 generate", I get the message as below. After delete 00000001_initial.migration.dart and rerun, it is OK. The message: -- Aqueduct CLI Version: 3.3.0+1 -- Aqueduct project version: 3.2.0 *** Uncaught error Bad state: NoSuchMethodError: The getter

How to downgrade Dart with Homebrew

允我心安 提交于 2020-06-12 09:13:20
问题 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 brew install dart@2.7.2 but got Error: No available formula with the name "dart@2.7.2" I also tried brew search dart but only got dart-lang/dart/dart ✔ dart-lang/dart/dart-beta dart-lang/dart/dart@1 dart-lang/dart/dart@2 dartsim There is no option

How to downgrade Dart with Homebrew

空扰寡人 提交于 2020-06-12 09:07:29
问题 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 brew install dart@2.7.2 but got Error: No available formula with the name "dart@2.7.2" I also tried brew search dart but only got dart-lang/dart/dart ✔ dart-lang/dart/dart-beta dart-lang/dart/dart@1 dart-lang/dart/dart@2 dartsim There is no option

Aqueduct - How to save client data without the user ID in my backend

霸气de小男生 提交于 2020-05-16 22:00:16
问题 How can I save data for a user when I don't know their user ID? I want to save it in my Aqueduct back end so I can protect and query current user data? @Operation.post() Future<Response> addData(@Bind.body(ignore: ['id']) Data newData) async { final query = Query<Data>(context)..values = newData; final insertData = await query.insert(); return Response.ok(insertData); } 回答1: Aqueduct automatically generates a user ID when you create a new user. That id is associated with the user's login

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

ぃ、小莉子 提交于 2020-05-11 01:51:17
问题 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. This is necessary both for logging out and for limiting damage if a user's account is compromised. I see there is a method authServer.revokeAllGrantsForResourceOwner(identifier) but I am still working on how to get the identifier from the user since

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

点点圈 提交于 2020-05-11 01:49:04
问题 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. This is necessary both for logging out and for limiting damage if a user's account is compromised. I see there is a method authServer.revokeAllGrantsForResourceOwner(identifier) but I am still working on how to get the identifier from the user since

Invalid client in aqueduct's db_and_auth/wildfire example

笑着哭i 提交于 2019-12-24 07:16:48
问题 I am new to Aqueduct and I am facing a invalid client error whenever I try to make a request to the /auth/token or /auth/code route. I have already added the OAuth2.0 client and verified the secret is correct. My request to /auth/token looks like this: Future main() async { var http2 = new http.Client(); var clientID = "com.wildfire.mobile"; var clientSecret = "myspecialsecret "; var body = "username=usr&password=pwd&grant_type=password"; var clientCredentials = new Base64Encoder().convert( "

Flutter - Pass a Future List to a SearchDelegate

早过忘川 提交于 2019-12-20 05:09:10
问题 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 server). Currently my screen lists all the contacts from the api, i'd now like to search against that contacts list. I'm assuming it would be best practice to pass the same list (which is already being displayed) to the search delegate. Unfortunately i'm

How can I convert string to utf8 in Dart?

本小妞迷上赌 提交于 2019-12-19 03:25:08
问题 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). S o, How can I convert string to utf8 in Dart? Example: @httpGet Future<Response> getLogin() async { Socket.connect('192.168.1.22’, 1024).then((socket) async { socket.listen((data) { // Expected return is: 1:_:2:_:175997:_:NİYAZİ TOROS print(new String.fromCharCodes(data).trim()); xResult = new String