master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
3 changed files with 37 additions and 0 deletions
Showing only changes of commit d6c9dfd8a7 - Show all commits

View File

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
/// Defines standard UI control states
enum ControlState { enum ControlState {
/// When the control is disabled and un-clickable /// When the control is disabled and un-clickable
disabled, disabled,

View File

@ -15,4 +15,5 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
export './control_state.dart'; export './control_state.dart';
export './extra_state.dart';
export './status_state.dart'; export './status_state.dart';

View File

@ -0,0 +1,35 @@
// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';
/// Defines extra UI control states that can
/// be combined with [ControlState]
enum ExtraState {
/// When the control is selected
selected,
/// When the control is invalid
invalid,
/// When the control is freezed
/// Useful to prevent user from changing the control state
freezed;
bool isSelected() => this == ExtraState.selected;
bool isInvalid() => this == ExtraState.invalid;
bool isFreezed() => this == ExtraState.freezed;
}