Flutterando / auto_injector

Dependency injection system. But without build_runner :)
https://pub.dev/packages/auto_injector
Other
54 stars 15 forks source link

Changing the split regex of paramsText to not ignore Map<String, dynamic>? and required types #9

Closed luanbatistadev closed 1 year ago

davidsdearaujo commented 1 year ago

Hello @luanbatistadev thanks for contributing!

Your regex works nice to your example but still doesn't work for more complex parameters like this one:

Map<String, List<Map<String, String>>>

To fix that we have created a package that resolves any nested generics types: fake_reflection

It would be nice if you could implement the fake_reflection instead of using your regex.

luanbatistadev commented 1 year ago

I will work on it @davidsdearaujo

luanbatistadev commented 1 year ago

@davidsdearaujo would it be interesting to use your package or bring it to the auto_injector(copy)?

luanbatistadev commented 1 year ago

@davidsdearaujo in fake_refection you have to do the tokenization, however it is private, i need to tokenize because the constructorString is a String

luanbatistadev commented 1 year ago

Screenshot 2023-08-21 at 15 08 15

davidsdearaujo commented 1 year ago

luanbatistadev @davidsdearaujo in fake_refection you have to do the tokenization, however it is private, i need to tokenize because the constructorString is a String

luanbatistadev @davidsdearaujo in fake_refection you have to do the tokenization, however it is private, i need to tokenize because the constructorString is a String

Screenshot 2023-08-21 at 15 08 15

As we discussed on Discord, we ar gonna keep the fake_reflection responsible for parsing the class constructor.

davidsdearaujo commented 1 year ago

Fixed on: