Skip to content

Commit 6a6a2b0

Browse files
CubeRomanMagellanMagellan
andauthored
SK-614: Update UI for 1-1 and group chat info (#108)
* fix FAB above keyboard update user info chat add SnackBar to non owner * update group info * update group info name, description * clear code --------- Co-authored-by: Magellan <magellan@connectycube.com>
1 parent 5310707 commit 6a6a2b0

11 files changed

Lines changed: 235 additions & 271 deletions

File tree

sama_chat_client/lib/src/features/conversation_group_create/view/group_create_form.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,21 @@ class GroupCreateFormState extends State<GroupCreateForm> {
8585
return previous.participants != current.participants;
8686
}, builder: (context, state) {
8787
return Visibility(
88-
visible: !keyboardIsOpenCtx(context),
89-
child: Visibility(
90-
visible: state.participants.isValid,
91-
child: IntrinsicWidth(
92-
child: ButtonForm(
93-
onPressed: () {
94-
_showGroupDetails(context);
95-
},
96-
backgroundColor: WidgetStatePropertyAll(
97-
state.participants.isValid
98-
? slateBlue
99-
: whiteAluminum),
100-
foregroundColor: WidgetStatePropertyAll(
101-
state.participants.isValid ? white : gainsborough),
102-
hint: 'Next'),
103-
),
104-
));
88+
visible: !keyboardIsOpenCtx(context) && state.participants.isValid,
89+
child: IntrinsicWidth(
90+
child: ButtonForm(
91+
onPressed: () {
92+
_showGroupDetails(context);
93+
},
94+
backgroundColor: WidgetStatePropertyAll(
95+
state.participants.isValid ? slateBlue : whiteAluminum),
96+
foregroundColor: WidgetStatePropertyAll(
97+
state.participants.isValid ? white : gainsborough),
98+
text: 'Next',
99+
textStyle: const TextStyle(
100+
fontWeight: FontWeight.w600, fontSize: 16)),
101+
),
102+
);
105103
}));
106104
}
107105
}
@@ -133,7 +131,9 @@ void _showGroupDetails(BuildContext context) {
133131
},
134132
backgroundColor: const WidgetStatePropertyAll(slateBlue),
135133
foregroundColor: const WidgetStatePropertyAll(white),
136-
hint: 'Create'),
134+
text: 'Create',
135+
textStyle: const TextStyle(
136+
fontWeight: FontWeight.w600, fontSize: 16)),
137137
)),
138138
)));
139139
}
@@ -232,7 +232,7 @@ class _GroupNameInput extends StatelessWidget {
232232
onChanged: (groupname) =>
233233
context.read<GroupBloc>().add(GroupnameChanged(groupname)),
234234
iconData: Icons.group,
235-
hint: 'Groupname',
235+
text: 'Groupname',
236236
error: state.groupname.displayError != null
237237
? state.groupname.displayError == GroupnameValidationError.short
238238
? 'Group name is too short'

sama_chat_client/lib/src/features/conversations_list/widgets/avatar_letter_icon.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AvatarLetterIcon extends StatelessWidget {
88
required this.name,
99
this.lastName,
1010
super.key,
11-
this.size = const Size(55, 60),
11+
this.size = const Size(55, 55),
1212
this.padding = EdgeInsets.zero,
1313
this.backgroundColor = black,
1414
this.textColor = dullGray,

0 commit comments

Comments
 (0)