Questions tagged [build-runner]
96 questions
0
votes
1 answer
Flutter Ferry GraphQL filter by eq null
I am having issues with passing null into graphQL filter variables
GGetPostsReq request = GGetPostsReq.fromJson({
"vars": {
"where": {
"deletedByProfileGuid": {
"eq": null
}
}
}
…

THE AMAZING
- 1,496
- 2
- 16
- 38
0
votes
2 answers
Failed to precompile build script .dart_tool/build/entrypoint/build.dart
I am facing a problem while updating the ferry package from 0.10.4 to 0.13.0. When executing dart run build_runner build --delete-conflicting-outputs, it always throws the next error:
`[WARNING] Invalidated precompiled build script due to core…

peter_lagoon
- 1
- 2
0
votes
1 answer
Why is my flutter code generation using `build_runner` and `source_gen` not creating output files?
I am trying to create a code generation package within Flutter using the build_runner and source_gen packages. I've looked over numerous examples but cannot seem to find what is preventing my output files from being created. I know it's probably…

amkuchta
- 33
- 8
0
votes
0 answers
How to build for prod an app with generated sources in Flutter
I'm using Json Serializable in my flutter web app, so during the dev process i used to run the following command to generate the toJson and fromJson code:
flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs
But now i…

Vimaire
- 55
- 6
0
votes
0 answers
How to pass arguments when we run Build runner in dart?
I want to write a code generation tool in dart for generating keys and trnaslation values in .dart files from json files.
I tried this
in lib/sample_console.dart
library sample_console;
import 'package:build/build.dart';
import…

Youhana Sheriff
- 66
- 3
0
votes
1 answer
Flutter build runner ElementVisitor get path
I am working with Code-Generation and trying to get the path of the Annotated-File.
I would need it inside the visitFieldElement:
@override
dynamic visitFieldElement(FieldElement element) {
// Get path here
}
I tried couple of different…

Chris
- 1,828
- 6
- 40
- 108
0
votes
1 answer
Flutter - How to use DataClass object in a model I want to serialize?
I am using Drift (Moor) v2.0.2+1 library for my local database and json_serializable v6.3.1 library to serialize my data models. Then I use build_runner v2.2.0 library to generate boilerplate code for both.
I have a database table called Passenger…

rya
- 1,417
- 1
- 16
- 29
0
votes
0 answers
Problem with freezed / build_runner in plain dart package: "dart run" command not available
I am trying to use the freezed package inside a plain dart package - NO flutter!
I am following the instructions at https://pub.dev/packages/freezed#run-the-generator .
My pubspec.yaml:
...
version: 1.0.0
# homepage:…

Michael
- 181
- 2
- 3
0
votes
1 answer
flutter: Pubspec.yaml Error for Analyzer and injectable_generator versions to run build_runner
I cant use build_runner: ^2.1.11 in flutter without adding analyzer: ^4.2.0.when its add it's possible to generate build_runner files like .g.dart and freezed.dart without any issues. but when it comes to injectable_generator: ^1.5.3 I can't even…

Ritvik adoor
- 21
- 1
- 2
0
votes
1 answer
How to Generate Json_Serializable Dart (Flutter) on Inheritance class?
Hello i have 2 parent class Student and Room, which two of them inheritance class model StudentModel and RoomModel, i am try to generate json converter using Json_Serializable Library on Model Class, but when i try to generate with build_runner its…

Sapatekno
- 1
- 1
0
votes
1 answer
Why does AutoRoute code generator create a _$$AppRouter class instead of AppRouter class
When trying to use the auto_route package on Flutter, the code generator created a different result than expected. The annotation for the code generation is quite straight forward:
import 'package:auto_route/auto_route.dart';
import…

vjchi
- 3
- 1
0
votes
4 answers
Flutter project build_runner issues
Currently I am trying to run a project where i am auto generating the response files. But I am getting some error while running build_runner cmd.
Command to auto generate files:
flutter pub run build_runner build
Following is the error that I am…

Sagar Acharya
- 3,397
- 4
- 12
- 34
0
votes
1 answer
Flutter auto generate keys of json/arb file to code
I am using the Flutter Intl plugin to generate an arb (JSON) file for internationalization. Content of file intl_en.arb is JSON like this:
{
"msg1": "message..",
"msg2": "message..",
"msg3": "message.."
}
I want to auto-generate all the keys…

dante
- 984
- 3
- 10
- 24
0
votes
1 answer
Mockito generate an invalid override for Methods that have as parameter an other generated class (generated from Moor)
We generate our database entities with moor. We have an database service as an facade for all database access. There we have the method
Future getDatabaseEntry(String entryId). DatabaseEntry is generated from moor.
In our test we…

nilssimon
- 11
- 3
0
votes
1 answer
Objectbox Generator Detailed Info about Issues?
When I run the objectbox_generator with flutter packages pub run build_runner watch the classes are being generated in the JSON, but shortly after that the Generation fails due to a null check issue. I checked my code and couldn't find any null…

DJ2695
- 62
- 2
- 6