We investigate an efficient method (T-junction with valve) to produce nonuniform droplets in micro- and nano-fluidic systems. The method relies on breakup of droplets in a T-junction with a valve in one of the minor branches. The system can be simply adjusted to generate droplets with an arbitrary volume ratio and does not suffer from the problems involved through applying the available methods for producing unequal droplets. A volume of fluid (VOF) based numerical scheme is used to study the method. Our results reveal that by decreasing the capillary number, smaller droplets can be produced in the branch with valve. Also, we find that the droplet breakup time is independent of the valve ratio and decreases with the increase of the capillary number. Also, the results indicate that the whole breakup length does not depend on the valve ratio. The whole breakup length decreases with the decrease of the capillary number at the microscales, but it is independent of the capillary number at the nanoscales. In the breakup process, if the tunnel forms the pressure drop does not depend on the valve ratio. Otherwise, the pressure drop reduces linearly by increasing the valve ratio.