A new ratiometric fluorescence detection of heparin based on the combination of the aggregation-induced fluorescence quenching and enhancement phenomena.