Add more icons
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hiddify/core/locale/locale.dart';
|
import 'package:hiddify/core/locale/locale.dart';
|
||||||
|
|
||||||
enum ProfilesSort {
|
enum ProfilesSort {
|
||||||
@@ -10,4 +11,9 @@ enum ProfilesSort {
|
|||||||
name => t.profile.sortBy.name,
|
name => t.profile.sortBy.name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconData get icon => switch (this) {
|
||||||
|
lastUpdate => Icons.update,
|
||||||
|
name => Icons.sort_by_alpha,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class ProfileActionButton extends HookConsumerWidget {
|
|||||||
ref.read(profilesNotifierProvider.notifier).updateProfile(profile),
|
ref.read(profilesNotifierProvider.notifier).updateProfile(profile),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.refresh),
|
child: const Icon(Icons.update),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ProfileActionsMenu(
|
return ProfileActionsMenu(
|
||||||
@@ -211,7 +211,7 @@ class ProfileActionsMenu extends HookConsumerWidget {
|
|||||||
builder: builder,
|
builder: builder,
|
||||||
menuChildren: [
|
menuChildren: [
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
leadingIcon: const Icon(Icons.refresh),
|
leadingIcon: const Icon(Icons.update),
|
||||||
child: Text(t.profile.update.buttonTxt.titleCase),
|
child: Text(t.profile.update.buttonTxt.titleCase),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (updateProfileMutation.state.isInProgress) {
|
if (updateProfileMutation.state.isInProgress) {
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ class ProfilesSortModal extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
selected: selected,
|
selected: selected,
|
||||||
|
leading: Icon(e.icon),
|
||||||
trailing: selected
|
trailing: selected
|
||||||
? IconButton(
|
? IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
Reference in New Issue
Block a user