f0cbe00b2f
- Updated `pubspec.lock` to new package versions for `async`, `fake_async`, `leak_tracker`, and `vm_service`. - Modified API endpoint for unread notifications to include `event_type=PUSH`. - Refactored `CompletionOfDocumentsMobilePage` layout for improved structure. - Simplified `DetailDropDown` widget by removing unnecessary animations. - Updated `CommentBox` styling and adjusted padding for better UI consistency. - Replaced deprecated `FormCard` implementation in final completion pages with a new widget structure. - Enhanced button styles across various dialogs and pages for a cohesive design.
85 lines
2.3 KiB
Dart
85 lines
2.3 KiB
Dart
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(),
|
|
],
|
|
);
|
|
}
|
|
}
|