How to generate random string in dart?

后端 未结 4 755
旧巷少年郎
旧巷少年郎 2021-01-12 00:37

I want to create a function that generates a random string in dart. It should include alphabets and numbers all mixed together. How can I do that?

4条回答
  •  一向
    一向 (楼主)
    2021-01-12 01:01

    I would try this package: https://pub.dev/packages/random_string

    Haven't used it myself but seems to meet your needs.

    It currently has a 99 rating so it should be good.

提交回复
热议问题