There are some providers that offer private repositories and you can also set up your own (https://dart.dev/tools/pub/custom-package-repositories). But for me, it's not worth the effort at the moment.
GitHub is not perfect, but it's the easiest way to get started with private packages (but with all the downsides).