diff --git a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart index 79397ee4..ec7f38b0 100644 --- a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart +++ b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart @@ -7,6 +7,7 @@ import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; +import 'package:random_character/chinese_character/random_chinese_charater.dart'; import 'package:velocity_x/velocity_x.dart'; class SignUpSetNicknamePage extends StatefulWidget { @@ -83,7 +84,10 @@ class _SignUpSetNicknamePageState extends State { '换一换'.text.make(), ].row(), shape: StadiumBorder(), - onPressed: () {}, + onPressed: () { + _textEditingController.text = + RandomCharacter.getChinese(length: 3); + }, ), ], ).pLTRB(82.w, 0, 82.w, 60.w), diff --git a/pubspec.lock b/pubspec.lock index 66f3f077..a610a73b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -882,6 +882,15 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.1.3" + random_character: + dependency: "direct main" + description: + path: "." + ref: HEAD + resolved-ref: "1b56c5ba30220c3942a8cf2ccd43f20185001b59" + url: "http://192.168.2.201:8099/zhangmeng/random_character.git" + source: git + version: "0.0.1" rational: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9481fd55..3f121fac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -101,6 +101,9 @@ dependencies: hive_flutter: logger: ^0.9.4 flutter_easyrefresh: ^2.1.8 + random_character: + git: + url: http://192.168.2.201:8099/zhangmeng/random_character.git dev_dependencies: flutter_test: