Skip to content

Rename subDir to dir in initFlutter, treat as relative or absolute#293

Open
jheld wants to merge 1 commit intoIO-Design-Team:mainfrom
jheld:patch-1
Open

Rename subDir to dir in initFlutter, treat as relative or absolute#293
jheld wants to merge 1 commit intoIO-Design-Team:mainfrom
jheld:patch-1

Conversation

@jheld
Copy link
Copy Markdown

@jheld jheld commented Mar 6, 2026

The concept here is mostly related to wanting more control over where the hive files are actually stored. Most likely the user would be choosing a dart built-in directory, but in the spirit of giving power back to the user, it seems simplest to base their decision on whether or not the path is relative (and continuing to treat the default null as relative for backwards compatibility/sanity).

@Rexios80
Copy link
Copy Markdown
Member

Rexios80 commented Mar 6, 2026

This would be a breaking change. If you need more control, you can create your own init method that makes the same calls as initFlutter.

@Rexios80 Rexios80 closed this Mar 6, 2026
@jheld
Copy link
Copy Markdown
Author

jheld commented Mar 6, 2026

This would be a breaking change. If you need more control, you can create your own init method that makes the same calls as initFlutter.

For curiosity sake, how is this a breaking change? null is treated the same, and non-absolute paths are treated the same. And the variable is only a positional argument.

Is there concern that people are passing in absolute (e.g. leading /) paths in here? if they are, then basically we're joining an absolute path with another absolute path and that itself, although is "legal" does feel a bit like undefined behavior given that typically people don't use / in their directory names. If that's the only concern, then I'd be fine creating initFlutterAbsoluteDir in this repo. It's very limiting that this repo does not give the user the ability to choose the entire path when it's a fairly small change to allow it.

And as far as breaking changes go, then increment the version to make it clear it's a breaking change - how can this change be so controversial?

@Rexios80
Copy link
Copy Markdown
Member

Rexios80 commented Mar 7, 2026

You're correct sorry. I missed that it is a positional argument not a named one. I'll take another look next week.

@Rexios80 Rexios80 reopened this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants