mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
migrate flutter3.0
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/data/res/color.dart';
|
||||
|
||||
class MenuItem {
|
||||
class DropdownBtnItem {
|
||||
final String text;
|
||||
final IconData icon;
|
||||
|
||||
const MenuItem({
|
||||
const DropdownBtnItem({
|
||||
required this.text,
|
||||
required this.icon,
|
||||
});
|
||||
@@ -24,19 +24,21 @@ class MenuItem {
|
||||
}
|
||||
|
||||
class ServerTabMenuItems {
|
||||
static const List<MenuItem> firstItems = [sftp, snippet, apt, docker];
|
||||
static const List<MenuItem> secondItems = [edit];
|
||||
static const List<DropdownBtnItem> firstItems = [sftp, snippet, apt, docker];
|
||||
static const List<DropdownBtnItem> secondItems = [edit];
|
||||
|
||||
static const sftp = MenuItem(text: 'SFTP', icon: Icons.insert_drive_file);
|
||||
static const snippet = MenuItem(text: 'Snippet', icon: Icons.label);
|
||||
static const sftp =
|
||||
DropdownBtnItem(text: 'SFTP', icon: Icons.insert_drive_file);
|
||||
static const snippet = DropdownBtnItem(text: 'Snippet', icon: Icons.label);
|
||||
static const apt =
|
||||
MenuItem(text: 'Apt/Yum', icon: Icons.system_security_update);
|
||||
static const docker = MenuItem(text: 'Docker', icon: Icons.view_agenda);
|
||||
static const edit = MenuItem(text: 'Edit', icon: Icons.edit);
|
||||
DropdownBtnItem(text: 'Apt/Yum', icon: Icons.system_security_update);
|
||||
static const docker =
|
||||
DropdownBtnItem(text: 'Docker', icon: Icons.view_agenda);
|
||||
static const edit = DropdownBtnItem(text: 'Edit', icon: Icons.edit);
|
||||
}
|
||||
|
||||
class DockerMenuItems {
|
||||
static const rm = MenuItem(text: 'Remove', icon: Icons.delete);
|
||||
static const start = MenuItem(text: 'Start', icon: Icons.play_arrow);
|
||||
static const stop = MenuItem(text: 'Stop', icon: Icons.stop);
|
||||
static const rm = DropdownBtnItem(text: 'Remove', icon: Icons.delete);
|
||||
static const start = DropdownBtnItem(text: 'Start', icon: Icons.play_arrow);
|
||||
static const stop = DropdownBtnItem(text: 'Stop', icon: Icons.stop);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user