Update dependencies, enhance API endpoints, and refactor UI components
- 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.
This commit is contained in:
@@ -16,30 +16,16 @@ class DetailDropDown extends StatefulWidget {
|
||||
class _DetailDropDownState extends State<DetailDropDown>
|
||||
with SingleTickerProviderStateMixin {
|
||||
bool isOpen = true;
|
||||
late AnimationController _animationController;
|
||||
late Animation<double> _rotationAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_animationController = AnimationController(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
vsync: this,
|
||||
);
|
||||
_rotationAnimation = Tween<double>(begin: 0.0, end: 0.5).animate(
|
||||
CurvedAnimation(parent: _animationController, curve: Curves.elasticIn),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_animationController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
@@ -48,11 +34,6 @@ class _DetailDropDownState extends State<DetailDropDown>
|
||||
setState(() {
|
||||
isOpen = !isOpen;
|
||||
});
|
||||
if (isOpen) {
|
||||
_animationController.forward();
|
||||
} else {
|
||||
_animationController.reverse();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 24.0.w(),
|
||||
@@ -62,17 +43,12 @@ class _DetailDropDownState extends State<DetailDropDown>
|
||||
border: Border.all(color: AppColors.grey60),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: AnimatedBuilder(
|
||||
animation: _rotationAnimation,
|
||||
builder: (context, child) {
|
||||
return Icon(
|
||||
isOpen
|
||||
? CupertinoIcons.chevron_up
|
||||
: CupertinoIcons.chevron_down,
|
||||
color: AppColors.grey60,
|
||||
size: 12,
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
isOpen
|
||||
? CupertinoIcons.chevron_up
|
||||
: CupertinoIcons.chevron_down,
|
||||
color: AppColors.grey60,
|
||||
size: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -88,24 +64,20 @@ class _DetailDropDownState extends State<DetailDropDown>
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12.0.h()),
|
||||
AnimatedSize(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
child:
|
||||
isOpen
|
||||
? Column(
|
||||
children:
|
||||
widget.items
|
||||
.map(
|
||||
(e) => Padding(
|
||||
padding: EdgeInsets.only(left: 12.0.w()),
|
||||
child: Text(e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
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(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user