ValentinVignal · GitHub

Is your feature request related to a problem? Please describe.

My personal use case is migrating from provider to riverpod. I'm introducing the import flutter_riverpod in files where provider is already imported. But both libraries are exporting a type ChangeNotifierProvider.
I'm migrating from provider to riverpod incrementally, so for now, I'm using both libraries. But ultimately, I will only use riverpod. I would be very useful to be able to change

import 'package:provider/provider.dart' ;

into

import 'package:provider/provider.dart'  as provider;

and update the file accordingly.

Describe the solution you'd like

It would be nice to add an option "add/remove alias` to an import which adds/removes the alias and update the rest of the file accordingly.

image

Describe alternatives you've considered

I'm updating the file by hand.

Read the original on github.com ↗