Skip to content

Commit 9578a8f

Browse files
committed
判空问题处理与代码质量检查
1 parent cdb7f44 commit 9578a8f

File tree

3 files changed

+278
-319
lines changed

3 files changed

+278
-319
lines changed

example/lib/group_manage_view.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class _GroupManageViewState extends State<GroupManageView> {
197197
void demoAddMember() async {
198198
print("demoAddMember ");
199199

200-
if (usernameTextEC1.text == null) {
200+
if (usernameTextEC1.text.isEmpty) {
201201
setState(() {
202202
_loading = false;
203203
_result = "【添加群成员】username 不能为空";
@@ -223,7 +223,7 @@ class _GroupManageViewState extends State<GroupManageView> {
223223
void demoRemoveMember() async {
224224
print("demoRemoveMember ");
225225

226-
if (usernameTextEC1.text == null) {
226+
if (usernameTextEC1.text.isEmpty) {
227227
setState(() {
228228
_loading = false;
229229
_result = "【移除群成员】username 不能为空";
@@ -322,7 +322,7 @@ class _GroupManageViewState extends State<GroupManageView> {
322322
_loading = true;
323323
});
324324

325-
if (usernameTextEC1.text == null || usernameTextEC1.text == "") {
325+
if (usernameTextEC1.text.isEmpty) {
326326
setState(() {
327327
_loading = false;
328328
_result = "【创建公开群】group name 不能为空";

0 commit comments

Comments
 (0)