toggle layout by dart lang