Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions lib/src/visual/context_menu/context_menu.helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ class ContextMenu extends StatefulWidget {
class _ContextMenuState extends State<ContextMenu> {
Offset? _tapPosition;

Widget _getIcon(IconData icon) {
Widget _getIcon(dynamic icon) {
return Padding(
padding: const EdgeInsets.only(left: 12),
child: FaIcon(
icon,
size: 20,
),
child: icon is IconData
? Icon(
icon,
size: 20,
)
: FaIcon(
icon as FaIconData?,
size: 20,
),
);
}

Expand Down Expand Up @@ -95,5 +100,5 @@ class ContextMenuItem {
});
final String title;
final Future<void> Function() onTap;
final IconData icon;
final dynamic icon;
}
18 changes: 12 additions & 6 deletions lib/src/visual/elements/better_list_title.element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BetterListTile extends StatelessWidget {
this.iconSize = 20,
this.padding,
});
final IconData? icon;
final dynamic icon;
final Widget? leading;
final Widget? trailing;
final String? text;
Expand All @@ -34,11 +34,17 @@ class BetterListTile extends StatelessWidget {
child: Center(
child: (leading != null)
? leading
: FaIcon(
icon,
size: iconSize,
color: color,
),
: (icon is IconData)
? Icon(
icon as IconData,
size: iconSize,
color: color,
)
: FaIcon(
icon as FaIconData?,
size: iconSize,
color: color,
),
),
),
trailing: trailing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,44 @@ class ActionButton extends StatelessWidget {
this.disable = false,
});
final VoidCallback? onPressed;
final IconData? icon;
final dynamic icon;
final Color? color;
final String tooltipText;
final bool disable;

@override
Widget build(BuildContext context) {
final isFaIcon = icon is FaIconData;
return Tooltip(
message: tooltipText,
child: IconButton(
icon: FaIcon(
icon,
size: (icon is FontAwesomeIcons) ? 25 : 30,
color: disable
? const Color.fromARGB(154, 255, 255, 255)
: color ?? Colors.white,
shadows: const [
Shadow(
color: Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
),
],
),
icon: isFaIcon
? FaIcon(
icon as FaIconData?,
size: 25,
color: disable
? const Color.fromARGB(154, 255, 255, 255)
: color ?? Colors.white,
shadows: const [
Shadow(
color: Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
),
],
)
: Icon(
icon as IconData?,
size: 30,
color: disable
? const Color.fromARGB(154, 255, 255, 255)
: color ?? Colors.white,
shadows: const [
Shadow(
color: Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
),
],
),
onPressed: () {
if (!disable && onPressed != null) onPressed!();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class _ChatGroupActionState extends State<ChatGroupAction> {
@override
Widget build(BuildContext context) {
var text = '';
IconData? icon;
FaIconData? icon;

final affected = (affectedContact == null)
? context.lang.groupActionYou
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _MutualGroupsExpansionTileCompState
child: SizedBox(
width: 20,
height: 20,
child: Icon(
child: FaIcon(
FontAwesomeIcons.userGroup,
size: 16,
color: context.color.onSurfaceVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _VerificationExpansionTileCompState
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
iconSize: 8,
icon: Icon(
icon: FaIcon(
FontAwesomeIcons.trash,
size: 8,
color: context.color.onSurfaceVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AddNewContactsPage extends StatelessWidget {

Widget _buildMethodItem(
BuildContext context, {
required IconData icon,
required FaIconData icon,
required String text,
}) {
return Padding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class _ModifyAvatarViewState extends State<ModifyAvatarView> {
_avatarMakerController.randomizedSelectedOptions,
),
IconButton(
icon: const Icon(FontAwesomeIcons.rotateLeft),
icon: const FaIcon(FontAwesomeIcons.rotateLeft),
onLongPress: () async {
await PersistentAvatarMakerController.clearAvatarMaker();
await _avatarMakerController.restoreState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ class _MissionRow extends StatelessWidget {
required this.desc,
});

final IconData icon;
final FaIconData icon;
final String title;
final String desc;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/visual/views/shared/select_contacts.view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SelectedContactView {
});
final String title;
final String Function(int selected, int? limit) submitButton;
final IconData submitIcon;
final FaIconData submitIcon;
}

class SelectContactsView extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/visual/views/unlock_twonly.view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _UnlockTwonlyViewState extends State<UnlockTwonlyView> {
children: [
const Spacer(),

const Icon(
const FaIcon(
FontAwesomeIcons.lock,
size: 40,
),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -868,10 +868,10 @@ packages:
dependency: "direct main"
description:
name: font_awesome_flutter
sha256: b9011df3a1fa02993630b8fb83526368cf2206a711259830325bab2f1d2a4eb0
sha256: "09dcde8ab90ffae1a7d65ff2ef96fc62a17ad9d0ce7c127b317ded676b0d5935"
url: "https://pub.dev"
source: hosted
version: "10.12.0"
version: "11.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
# Trusted publisher fluttercommunity.dev
connectivity_plus: ^7.0.0
device_info_plus: ^12.1.0
font_awesome_flutter: ^10.10.0
font_awesome_flutter: ^11.0.0
share_plus: ^12.0.0
package_info_plus: ^9.0.0
workmanager: ^0.9.0+3
Expand Down
Loading