chore: remove unused theme methods

This commit is contained in:
Rongjian Zhang 2020-02-08 12:53:56 +08:00
parent 0455d5ec59
commit 3d9e2fd5e1
1 changed files with 77 additions and 113 deletions

View File

@ -213,18 +213,7 @@ class ThemeModel with ChangeNotifier {
}
}
pushGitlab(BuildContext context, String url, {bool replace = false}) {
if (url.startsWith('/')) {
push(context, '/gitlab/$url', replace: replace);
} else {
launchUrl(url);
}
}
Future<bool> showConfirm(BuildContext context, Widget content) {
switch (theme) {
case AppThemeType.cupertino:
default:
return showCupertinoDialog(
context: context,
builder: (context) {
@ -272,7 +261,6 @@ class ThemeModel with ChangeNotifier {
// },
// );
}
}
Future<T> showDialogOptions<T>(
BuildContext context, List<DialogOption<T>> options) {
@ -332,33 +320,10 @@ class ThemeModel with ChangeNotifier {
}
}
showSelector<T>({
@required BuildContext context,
@required Iterable<SelectorItem<T>> items,
@required T selected,
}) async {
switch (theme) {
case AppThemeType.cupertino:
default:
return showMenu<T>(
context: context,
initialValue: selected,
items: items
.map((item) =>
PopupMenuItem(value: item.value, child: Text(item.text)))
.toList(),
position: RelativeRect.fromLTRB(1, 10, 0, 0),
);
}
}
static Timer _debounce;
String _selectedItem;
showPicker(BuildContext context, PickerGroupItem<String> groupItem) async {
switch (theme) {
case AppThemeType.cupertino:
default:
await showCupertinoModalPopup(
context: context,
builder: (context) {
@ -396,7 +361,6 @@ class ThemeModel with ChangeNotifier {
groupItem.onClose(_selectedItem);
}
}
}
showActions(BuildContext context, List<ActionItem> actionItems) async {
if (actionItems == null) return;