RIP-Comm / sossoldi

"Sossoldi" is a wealth management / personal finance / Net Worth tracking app, made with Flutter.
MIT License
266 stars 74 forks source link

Use relative path to import files #43

Closed GBergatto closed 1 year ago

GBergatto commented 1 year ago

To keep a consistent coding style, I suggest we use relative paths when importing files from within our app.

// Before
import 'package:sossoldi/model/example.dart';

// After
import 'model/example.dart';

As long as we use it consistently, any of the two styles will have the same performance. However, it's important not to mix them as that might lead to some issues.

The official guide on dart recommends using relative import paths. See also https://stackoverflow.com/q/59693195/14157994 for pros and cons.

The reason why I prefer relative paths is that they are shorter and help differentiate between our files (within lib) and external packages.

mikev-cw commented 1 year ago

Now all paths are correctly switched to relative. Thank you, I'm closing this.