27 lines
1.3 KiB
Dart
27 lines
1.3 KiB
Dart
|
|
import 'package:flutter/material.dart';
|
|
import 'package:oc_front/models/search.dart';
|
|
|
|
class DataItemWidget extends StatefulWidget {
|
|
DataItem item;
|
|
DataItemWidget ({ super.key, required this.item });
|
|
@override DataItemWidgetState createState() => DataItemWidgetState();
|
|
}
|
|
class DataItemWidgetState extends State<DataItemWidget> {
|
|
@override Widget build(BuildContext context) {
|
|
return Wrap( children: [
|
|
Padding(padding: EdgeInsets.symmetric(vertical: 20, horizontal: 100),
|
|
child: Text("type : ${widget.item.dtype ?? "unknown type"}",
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600))),
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 100, vertical: 20),
|
|
child: Text("location : ${widget.item.location ?? "unknown location"}",
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600))),
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 100, vertical: 20),
|
|
child: Text("protocol : ${widget.item.protocol.isEmpty ? "no protocol founded" : widget.item.protocol.join(",")}",
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600))),
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 100, vertical: 20),
|
|
child: Text("ex : ${widget.item.example ?? "no example"}",
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600))),
|
|
]);
|
|
}
|
|
} |