import 'package:oc_front/main.dart'; import 'package:flutter/material.dart'; import 'package:oc_front/models/resources/resources.dart'; // ignore: must_be_immutable class ItemWidget extends StatefulWidget { AbstractItem item; ItemWidget ({ super.key, required this.item }); @override ItemWidgetState createState() => ItemWidgetState(); } class ItemWidgetState extends State { @override Widget build(BuildContext context) { Widget w = Container(); return SizedBox( height: getHeight(context) - 300, child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ widget.item.description == null ? Container() : Container( width: getMainWidth(context), alignment: Alignment.center, decoration: BoxDecoration(border: Border(bottom: BorderSide(color: midColor))), padding: const EdgeInsets.all(30), child: Text(widget.item.description!, style: TextStyle(fontSize: 15, color: Colors.grey, fontWeight: FontWeight.w500))), Container(padding: const EdgeInsets.all(30), alignment: Alignment.topLeft, color: midColor, width: getMainWidth(context) / 2, child: w) ] ) ) ); } }