Build Your Own Custom Code Generator in Flutter | Flutter Code Generation

Build Your Own Custom Code Generator in Flutter | Flutter Code Generation

Rivaan Ranawat

1 год назад

12,637 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@marufhassan634
@marufhassan634 - 28.12.2022 22:22

It was an amazing tutorial and this may seem redundant to most but having this on your CV can give it a huge boost and make you stand out among thousands of CVs. As Rivaan mentioned, there aren't many resources where you can learn this so it's a huge contribution to the Flutter community as well.

My only issue with video is that there is an error in the model class even after running code gen which shouldn't be there and commenting a model class used in codegen is a bad practice. No one is going to remember why they did it after a few weeks. If some GDE or expert can point out the issue and the fix, it would be really helpful and Rivaan can pin it in the comment section.

Ответить
@redaantar8908
@redaantar8908 - 09.01.2024 21:10

I just discovered your channel, and I’m literally amused of the knowledge you covered in your videos, i have a question pls, do you have any idea about how the apps gen services (drag and drop) such as flutterflow works behind the scenes.

Ответить
@manasas6785
@manasas6785 - 30.11.2023 14:02

Hi, I did the same steps as you did but my code isn't generating .g files. However the build is successful.

example % flutter pub run build_runner build watch --delete-conflicting-outputs
Deprecated. Use `dart run` instead.
Resolving dependencies...
Got dependencies.
Building package executable... (3.4s)
Built build_runner:build_runner.
[INFO] Generating build script completed, took 163ms
[WARNING] Throwing away cached asset graph because the language version of some package(s) changed. This would most commonly happen when updating dependencies or changing your min sdk constraint.
[INFO] Cleaning up outputs from previous builds. completed, took 2ms
[INFO] Generating build script completed, took 29ms
[WARNING] Invalidated precompiled build script due to missing asset graph.
[INFO] Precompiling build script... completed, took 450ms
[INFO] Building new asset graph completed, took 621ms
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms
[INFO] Generating SDK summary completed, took 2.3s
[INFO] Running build completed, took 2.5s
[INFO] Caching finalized dependency graph completed, took 28ms
[INFO] Succeeded after 2.5s with 2 outputs (6 actions)

Can you guide me i'm very new to this

Ответить
@Aboelnasrmo
@Aboelnasrmo - 11.11.2023 21:28

Hi Rivan , thanks for the video , i have one question , how to use it in another app?

Ответить
@Elite7555
@Elite7555 - 02.11.2023 04:19

Alright, now I understand why everybody hates code generation in Dart.

Ответить
@zendphpcolombia4902
@zendphpcolombia4902 - 21.09.2023 12:56

Nice video thanks, although india english is a battle field hahaha, anyway you have a new subscriber

Ответить
@dimilkalathiya
@dimilkalathiya - 16.09.2023 19:41

Amazing video rivaan

I was able to create simple generator that makes extension for class to create copyWith method without error

But unfortunately it turns out that this code doesn't work with latest plugin update i wasn't able to generate any code untill I've used your pubspec.lock file to lock to your versions 😅

I really appreciate your work if you got any new info please let us know on brief or new video for it will always be treat for eyes 🎉

Ответить
@Raph-Ray
@Raph-Ray - 16.08.2023 02:41

Amazing video. How can I avoid using " part 'tartgetfile.g.dart' I am developing graphql types to dart class and providing help methods to initiate the classes with json(properly json from graphql request) pure graphql types

Ответить
@aktxyz
@aktxyz - 24.06.2023 19:08

at one point your command line has "flutter pub run build_runner build watch " ... not sure but I think it should be "build" or "watch" ... not both?

Ответить
@a.alg0hary549
@a.alg0hary549 - 15.05.2023 03:37

this channel is amazing

Ответить
@faheemullah9121
@faheemullah9121 - 16.04.2023 13:44

You have a unique of teaching.
I appreciate your efforts and time for us.
I would request you to provide us a short video on bloc pattern in flutter.
That have main key points of bloc pattern.
Thanks 💌

Ответить
@lightgaming1142
@lightgaming1142 - 20.02.2023 09:34

How would I access the generic type of the annotation ex.: @MyAnnotation<Model> how do I get the Model classname. And how should I do imports in the generated code? Like how would I import the Model class?

Ответить
@siddhant4882
@siddhant4882 - 19.02.2023 09:19

great channel and great tut, well done.

Ответить
@FathiAlamre
@FathiAlamre - 16.02.2023 20:23

Thanks bro.
How can i generate code from @Body for example ?

@POST('/login')
Future<BaseResponse<UserModel>> login({@Body() required BaseRequest<LoginRequestModel> loginRequestModel});

Ответить
@abhayrawat8812
@abhayrawat8812 - 19.01.2023 14:16

Super video bro.... Thanks a lot for info !!!🤟

Ответить
@amitjajoo9510
@amitjajoo9510 - 06.01.2023 12:50

create a series on awesome notification and local notification

Ответить
@RandalLSchwartz
@RandalLSchwartz - 04.01.2023 06:34

At 25 minutes, you could have used `for (final entry in visitor.fields.entries)` and then referenced entry.key and entry.value without needing to reference the original structure. Much easier to avoid an off-by-1 problem as well..

Ответить
@bossphotography8821
@bossphotography8821 - 03.01.2023 20:56

Bro please make a home services app with backend..

Love from Bangladesh 🇧🇩

Ответить
@surajbhosale6095
@surajbhosale6095 - 29.12.2022 12:35

Can You make the crowdfunding app in flutter

Ответить
@sarathrkrishnan6610
@sarathrkrishnan6610 - 29.12.2022 06:41

Superb bro

Ответить
@prashantbhardwaj7627
@prashantbhardwaj7627 - 29.12.2022 02:19

Thank you God for sending Rivaan.

Ответить
@kalifasenou4820
@kalifasenou4820 - 28.12.2022 19:37

thanks, it's realy helpfull

Ответить
@sammyjokes9613
@sammyjokes9613 - 28.12.2022 17:24

Every time you drop a new content, I'm eager to watch coz I know it's going to be benefiting ❤

Ответить
@md.ismailalamkhan
@md.ismailalamkhan - 28.12.2022 17:02

Really great explanation good job man.

Ответить
@uglypieceofcrap5428
@uglypieceofcrap5428 - 28.12.2022 16:42

starting watching this right awwayyyyyyyyy

Ответить
@randomcsguy2065
@randomcsguy2065 - 28.12.2022 16:37

DAMN!!!!!!!!!!!!!!!! cannut wait to see how far rivan will go in 2023

Ответить
@dabelydadi7551
@dabelydadi7551 - 28.12.2022 16:31

Riivan there is no one like you in this world, all your content are pretty valuable

Ответить
@adilelkhallouki6634
@adilelkhallouki6634 - 28.12.2022 16:24

really your channel is a treasure cave👌👌👌

Ответить
@raphaeljaggerd3585
@raphaeljaggerd3585 - 28.12.2022 16:11

Hey man. I love your vids.
I know your're a busy man but if you can i'd love to see a vid on intergrating flutter with openai or gtp3

Ответить
@destinymatthew8515
@destinymatthew8515 - 28.12.2022 16:09

Nice one bro ❤️🙏

Ответить