The commands you need for layer2-switched traffic:
ip flow ingress layer2-switched vlan <vlanlist>
ip flow export layer2-switched vlan <vlanlist>
However, from the IOS guide: A PFC3B or PFC3BXL running 12.2(18)SXE or higher is required for this command, which enables NDE for all traffic within the specified VLANs rather than just inter-VLAN traffic.
If you are using a CatOS you may use the following command:
set mls bridged-flow-statistics enable <vlanlist>