felangel / felangel/mason

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

Đang mở
#574 8 bình luận 5 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
Dart
Star
1.1k
Fork
113
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.