86ed7bc665
- Updated the `Lot`, `Organization`, and `OrganizationAddress` models to enhance data mapping for tender details. - Revised the `TenderData` model to include additional fields reflecting the API response structure. - Improved UI components across desktop, mobile, and tablet views by commenting out unused sections for future use. - Added new string constants for lot details in the tender information section. - Enhanced unit tests to cover new model fields and ensure resilience to partial API payloads.
87 lines
2.4 KiB
Dart
87 lines
2.4 KiB
Dart
// Currently unused — previously used by the mock sections in TenderDetailHeader,
|
|
// which are now disabled. Kept for when those sections are re-enabled.
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
|
|
import '../../../core/theme/colors.dart';
|
|
|
|
class DetailDropDown extends StatefulWidget {
|
|
final String title;
|
|
final List<String> items;
|
|
const DetailDropDown({required this.title, required this.items, super.key});
|
|
|
|
@override
|
|
State<DetailDropDown> createState() => _DetailDropDownState();
|
|
}
|
|
|
|
class _DetailDropDownState extends State<DetailDropDown>
|
|
with SingleTickerProviderStateMixin {
|
|
bool isOpen = true;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
InkWell(
|
|
onTap: () {
|
|
setState(() {
|
|
isOpen = !isOpen;
|
|
});
|
|
},
|
|
child: Container(
|
|
width: 24.0.w(),
|
|
height: 24.0.h(),
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
border: Border.all(color: AppColors.grey60),
|
|
),
|
|
alignment: Alignment.center,
|
|
child: Icon(
|
|
isOpen
|
|
? CupertinoIcons.chevron_up
|
|
: CupertinoIcons.chevron_down,
|
|
color: AppColors.grey60,
|
|
size: 12,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 8.0.w()),
|
|
Text(
|
|
widget.title,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontSize: 16.0.sp(),
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 12.0.h()),
|
|
isOpen
|
|
? Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children:
|
|
widget.items
|
|
.map(
|
|
(e) => Padding(
|
|
padding: EdgeInsets.only(left: 12.0.w()),
|
|
child: Text(e),
|
|
),
|
|
)
|
|
.toList(),
|
|
)
|
|
: const SizedBox.shrink(),
|
|
],
|
|
);
|
|
}
|
|
}
|