In aqueous medium basic strength is dependent on electron density on nitrogen as well as solvation of cation formed after accepting H+. In protic solvent like water, the order of basic strength is
Me2NH>MeNH2>Me3N>NH3.
This happens beacuse in case of Me2NH there will be optimum (+I) and solvation while in MeNH2 has more significant hydration than Me3N.