It depends on what you want to do.
I don't know if I'd say more flexible, but a keyboard would be more CONEVENIENT if you needed to use your sounds in a live situation and wanted to haul just the keyboard instead of your computer or a rack of synthesizers.
For me, it makes more sense financially to just buy a midi controller because I only use VST instruments (synthesizers contained on my computer).