felangel / felangel/mason

Question: Is it possible to include a line of code in a file that already exists?

Open
#574 8 comments 5 reactions 0 assignees View on GitHub
question
Dominant language
Dart
Stars
1.1k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

Can someone help me with this please?
I need to be able to put a line of code inside a class of a file that already exists.

Example:

I have the file Routes.dart
```
class Routes {
static const INITIAL = '/';
static const INTRO = '/intro';
}
```

And I need to put this line inside the Routes class in Routes.dart
```
static const {{name.constantCase()}} = '/{{name.paramCase()}}';
```

Let's say the name of the route is "generic route"

So the complete file would be
```
class Routes {
static const INITIAL = '/';
static const INTRO = '/intro';
static const GENERIC_ROUTE = '/generic-route';
}
```

I appreciate who can help me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.