info on resource item
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:oc_front/pages/shared.dart';
|
||||
|
||||
class ShallowDropdownInputWidget extends StatefulWidget {
|
||||
double? width;
|
||||
double? height;
|
||||
CollaborativeAreaType type = CollaborativeAreaType.workspace;
|
||||
Future<List<Shallow>> Function()? all;
|
||||
Future<void> Function(String)? load;
|
||||
@@ -17,7 +18,7 @@ class ShallowDropdownInputWidget extends StatefulWidget {
|
||||
Widget? prefixIcon;
|
||||
IconData? iconLoad;
|
||||
IconData? iconRemove;
|
||||
|
||||
String? label;
|
||||
String? hint;
|
||||
|
||||
String? tooltipLoad;
|
||||
@@ -30,8 +31,8 @@ class ShallowDropdownInputWidget extends StatefulWidget {
|
||||
bool deletion = false;
|
||||
|
||||
ShallowDropdownInputWidget ({ Key? key, this.width, this.current, required this.all, this.prefixIcon,
|
||||
this.iconLoad, this.iconRemove, this.hint, this.filled, this.hintColor, this.color,
|
||||
this.tooltipLoad, this.tooltipRemove, this.deletion = false, this.maptoDropdown,
|
||||
this.iconLoad, this.iconRemove, this.hint, this.filled, this.hintColor, this.color, this.height,
|
||||
this.tooltipLoad, this.tooltipRemove, this.deletion = false, this.maptoDropdown, this.label,
|
||||
required this.type, this.canLoad, this.canRemove, this.load, this.remove, this.change }): super(key: key);
|
||||
@override ShallowDropdownInputWidgetState createState() => ShallowDropdownInputWidgetState();
|
||||
}
|
||||
@@ -54,11 +55,12 @@ class ShallowDropdownInputWidgetState extends State<ShallowDropdownInputWidget>
|
||||
data: Theme.of(context).copyWith(
|
||||
canvasColor: widget.filled ??Colors.white,
|
||||
),
|
||||
child: Container( height: 50, width: (widget.width ?? getMainWidth(context)) - (widget.load == null ? 0 : 50) - (widget.remove == null ? 0 : 50),
|
||||
child: Container( height: widget.height ?? 50,
|
||||
width: (widget.width ?? getMainWidth(context)) - (widget.load == null ? 0 : 50) - (widget.remove == null ? 0 : 50),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: DropdownButtonFormField(
|
||||
child: Center(child: DropdownButtonFormField(
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.current = value;
|
||||
@@ -78,6 +80,8 @@ class ShallowDropdownInputWidgetState extends State<ShallowDropdownInputWidget>
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
label: widget.label == null ? null : Text(widget.label!),
|
||||
alignLabelWithHint: false,
|
||||
prefixIconColor: Colors.grey,
|
||||
prefixIcon: widget.prefixIcon,
|
||||
suffixIconColor: widget.hintColor ?? Colors.grey ,
|
||||
@@ -88,7 +92,7 @@ class ShallowDropdownInputWidgetState extends State<ShallowDropdownInputWidget>
|
||||
contentPadding: EdgeInsets.only(left: (widget.width ?? 400) < 200 ? 0 : 30, right: (widget.width ?? 400) < 200 ? 0 : 30, top: 18, bottom: 18),
|
||||
),
|
||||
items: items,
|
||||
)))),
|
||||
))))),
|
||||
widget.load == null ? Container() : Tooltip(
|
||||
message: widget.tooltipLoad ?? "load $t",
|
||||
child:InkWell(
|
||||
|
||||
Reference in New Issue
Block a user