flutter随机颜色生成 Posted on 2021-01-05 Edited on 2021-01-12 In flutter 在listview或gridview中,用index去获颜色,挨个取一遍 1Colors.primaries[index % Colors.primaries.length]