-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-1734: Add button “Remove from group” when open chat info
- Loading branch information
Showing
6 changed files
with
158 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
lib/presentation/enum/profile_info/profile_info_body_enum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/l10n.dart'; | ||
import 'package:linagora_design_flutter/linagora_design_flutter.dart'; | ||
|
||
enum ProfileInfoActions { | ||
sendMessage, | ||
removeFromGroup; | ||
|
||
String label(BuildContext context) { | ||
switch (this) { | ||
case ProfileInfoActions.sendMessage: | ||
return L10n.of(context)!.sendMessage; | ||
case ProfileInfoActions.removeFromGroup: | ||
return L10n.of(context)!.removeFromGroup; | ||
} | ||
} | ||
|
||
TextStyle textStyle(BuildContext context) { | ||
switch (this) { | ||
case ProfileInfoActions.sendMessage: | ||
return Theme.of(context).textTheme.titleMedium!.copyWith( | ||
color: LinagoraSysColors.material().primary, | ||
); | ||
case ProfileInfoActions.removeFromGroup: | ||
return Theme.of(context).textTheme.titleMedium!.copyWith( | ||
color: LinagoraSysColors.material().error, | ||
); | ||
} | ||
} | ||
|
||
Icon icon() { | ||
switch (this) { | ||
case ProfileInfoActions.sendMessage: | ||
return const Icon(Icons.chat_outlined); | ||
case ProfileInfoActions.removeFromGroup: | ||
return Icon( | ||
Icons.logout_outlined, | ||
color: LinagoraSysColors.material().error, | ||
); | ||
} | ||
} | ||
} |