Skip to content

Commit 5bbd0ff

Browse files
committed
refactor: rename button title prop to label across all UI components
1 parent 623579f commit 5bbd0ff

26 files changed

+49
-49
lines changed

lib/ui/auth_flow/create_profile_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class _CreateProfileScreenState extends ConsumerState<CreateProfileScreen> {
203203
final isButtonDisabled = accountState.isLoading || _isLoadingDisplayName;
204204

205205
return WnFilledButton(
206-
title: 'Finish',
206+
label: 'Finish',
207207
loading: isButtonDisabled,
208208
onPressed:
209209
isButtonDisabled

lib/ui/auth_flow/info_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class _InfoScreenState extends ConsumerState<InfoScreen> {
120120
return WnFilledButton(
121121
loading: isButtonDisabled,
122122
onPressed: isButtonDisabled ? null : () => _onContinuePressed(context),
123-
title: 'Setup Profile',
123+
label: 'Setup Profile',
124124
suffixIcon: SvgPicture.asset(
125125
AssetsPaths.icArrowRight,
126126
colorFilter: ColorFilter.mode(

lib/ui/auth_flow/login_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen> with WidgetsBindingOb
228228
return WnFilledButton(
229229
loading: authState.isLoading,
230230
onPressed: _keyController.text.isEmpty ? null : _onContinuePressed,
231-
title: 'Login',
231+
label: 'Login',
232232
);
233233
},
234234
),

lib/ui/auth_flow/welcome_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ class _WelcomeScreenState extends ConsumerState<WelcomeScreen> {
9393
mainAxisSize: MainAxisSize.min,
9494
children: [
9595
WnFilledButton(
96-
title: 'Login',
96+
label: 'Login',
9797
visualState: WnButtonVisualState.secondary,
9898
onPressed: _isCreatingAccount ? null : () => context.go('/login'),
9999
),
100100
Gap(12.h),
101101
WnFilledButton(
102-
title: 'Sign Up',
102+
label: 'Sign Up',
103103
loading: _isCreatingAccount,
104104
onPressed: _isCreatingAccount ? null : () => _handleCreateAccount(context),
105105
),

lib/ui/chat/chat_info/dm_chat_info.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class _DMChatInfoState extends ConsumerState<DMChatInfo> {
198198
WnFilledButton(
199199
size: WnButtonSize.small,
200200
visualState: WnButtonVisualState.secondary,
201-
title: 'Search Chat',
201+
label: 'Search Chat',
202202
suffixIcon: SvgPicture.asset(
203203
AssetsPaths.icSearch,
204204
width: 14.w,
@@ -217,7 +217,7 @@ class _DMChatInfoState extends ConsumerState<DMChatInfo> {
217217
size: WnButtonSize.small,
218218
visualState:
219219
isContact ? WnButtonVisualState.secondary : WnButtonVisualState.primary,
220-
title: isContact ? 'Remove Contact' : 'Add Contact',
220+
label: isContact ? 'Remove Contact' : 'Add Contact',
221221
loading: isContactLoading,
222222
suffixIcon: SvgPicture.asset(
223223
isContact ? AssetsPaths.icRemoveUser : AssetsPaths.icAddUser,
@@ -244,7 +244,7 @@ class _DMChatInfoState extends ConsumerState<DMChatInfo> {
244244
WnFilledButton(
245245
size: WnButtonSize.small,
246246
visualState: WnButtonVisualState.secondary,
247-
title: 'Add to Group',
247+
label: 'Add to Group',
248248
suffixIcon: SvgPicture.asset(
249249
AssetsPaths.icAdd,
250250
width: 14.w,

lib/ui/chat/chat_info/widgets/group_member_bottom_sheet.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ class _GroupMemberBottomSheetState extends ConsumerState<GroupMemberBottomSheet>
162162
size: WnButtonSize.small,
163163
onPressed: () => Navigator.pop(context),
164164
visualState: WnButtonVisualState.secondary,
165-
title: 'Cancel',
165+
label: 'Cancel',
166166
),
167167
Gap(8.h),
168168
WnFilledButton(
169169
size: WnButtonSize.small,
170170
loading: _isRemoving,
171171
onPressed: _isRemoving ? null : _removeFromGroup,
172172
visualState: WnButtonVisualState.destructive,
173-
title: 'Remove From Group',
173+
label: 'Remove From Group',
174174
),
175175
],
176176
),
@@ -276,7 +276,7 @@ class _GroupMemberBottomSheetState extends ConsumerState<GroupMemberBottomSheet>
276276
onPressed: _openAddToGroup,
277277
size: WnButtonSize.small,
278278
visualState: WnButtonVisualState.secondary,
279-
title: 'Add to Another Group',
279+
label: 'Add to Another Group',
280280
suffixIcon: SvgPicture.asset(
281281
AssetsPaths.icChatInvite,
282282
width: 14.w,
@@ -298,7 +298,7 @@ class _GroupMemberBottomSheetState extends ConsumerState<GroupMemberBottomSheet>
298298
},
299299
size: WnButtonSize.small,
300300
visualState: WnButtonVisualState.secondaryWarning,
301-
title: 'Remove From Group',
301+
label: 'Remove From Group',
302302
titleTextStyle: context.textTheme.bodyMedium?.copyWith(
303303
color: context.colors.destructive,
304304
fontWeight: FontWeight.w600,

lib/ui/chat/chat_info/widgets/member_action_buttons.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class _SendMessageButtonState extends ConsumerState<SendMessageButton> {
8282
loading: _isLoading,
8383
size: WnButtonSize.small,
8484
visualState: WnButtonVisualState.secondary,
85-
title: 'Send Message',
85+
label: 'Send Message',
8686
suffixIcon: SvgPicture.asset(
8787
AssetsPaths.icMessage,
8888
width: 14.w,
@@ -158,7 +158,7 @@ class _AddToContactButtonState extends ConsumerState<AddToContactButton> {
158158
loading: _isLoading,
159159
size: WnButtonSize.small,
160160
visualState: WnButtonVisualState.secondary,
161-
title: isContact ? 'Remove Contact' : 'Add Contact',
161+
label: isContact ? 'Remove Contact' : 'Add Contact',
162162
suffixIcon: SvgPicture.asset(
163163
isContact ? AssetsPaths.icRemoveUser : AssetsPaths.icAddUser,
164164
width: 11.w,

lib/ui/chat/chat_management/add_to_group_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class _AddToGroupScreenState extends ConsumerState<AddToGroupScreen> {
215215
bottom: 16.h,
216216
),
217217
child: WnFilledButton(
218-
title: 'Add to Group',
218+
label: 'Add to Group',
219219
loading: _isLoading,
220220
onPressed: _groupsToAddUserTo.isEmpty ? null : _addUserToGroups,
221221
),

lib/ui/chat/invite/chat_invite_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class _ChatInviteScreenState extends ConsumerState<ChatInviteScreen> {
7171
child: Column(
7272
children: [
7373
WnFilledButton(
74-
title: 'Decline',
74+
label: 'Decline',
7575
visualState: WnButtonVisualState.secondary,
7676
onPressed: () async {
7777
await welcomesNotifier.declineWelcomeInvitation(widget.inviteId);
@@ -82,7 +82,7 @@ class _ChatInviteScreenState extends ConsumerState<ChatInviteScreen> {
8282
),
8383
Gap(8.h),
8484
WnFilledButton(
85-
title: 'Accept',
85+
label: 'Accept',
8686
loading: _isAccepting,
8787
onPressed:
8888
_isAccepting

lib/ui/contact_list/group_chat_details_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class _GroupChatDetailsSheetState extends ConsumerState<GroupChatDetailsSheet> w
300300
WnFilledButton(
301301
onPressed: _isCreatingGroup || !_isGroupNameValid ? null : _createGroupChat,
302302
loading: _isCreatingGroup,
303-
title: _isCreatingGroup ? 'Creating Group...' : 'Create Group',
303+
label: _isCreatingGroup ? 'Creating Group...' : 'Create Group',
304304
),
305305
],
306306
);

0 commit comments

Comments
 (0)