feat: custom appbar
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../components/appbar/appbar.dart';
|
||||
import '../../components/button/button.dart';
|
||||
import '../../components/spacer/spacer.dart';
|
||||
import 'widgets/appbar.dart';
|
||||
import 'widgets/status_tile.dart';
|
||||
import 'widgets/transaction_tile.dart';
|
||||
|
||||
@@ -23,10 +21,8 @@ class _TransactionPageState extends State<TransactionPage>
|
||||
with TickerProviderStateMixin {
|
||||
late AnimationController _fadeController;
|
||||
late AnimationController _slideController;
|
||||
late AnimationController _rotationController;
|
||||
late Animation<double> _fadeAnimation;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
late Animation<double> _rotationAnimation;
|
||||
|
||||
// Filter state
|
||||
String selectedFilter = 'All';
|
||||
@@ -51,11 +47,6 @@ class _TransactionPageState extends State<TransactionPage>
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_rotationController = AnimationController(
|
||||
duration: const Duration(seconds: 3),
|
||||
vsync: this,
|
||||
)..repeat();
|
||||
|
||||
_fadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _fadeController, curve: Curves.easeInOut),
|
||||
);
|
||||
@@ -65,11 +56,6 @@ class _TransactionPageState extends State<TransactionPage>
|
||||
CurvedAnimation(parent: _slideController, curve: Curves.elasticOut),
|
||||
);
|
||||
|
||||
_rotationAnimation = Tween<double>(
|
||||
begin: 0,
|
||||
end: 2 * math.pi,
|
||||
).animate(_rotationController);
|
||||
|
||||
_fadeController.forward();
|
||||
_slideController.forward();
|
||||
}
|
||||
@@ -78,7 +64,6 @@ class _TransactionPageState extends State<TransactionPage>
|
||||
void dispose() {
|
||||
_fadeController.dispose();
|
||||
_slideController.dispose();
|
||||
_rotationController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -154,9 +139,7 @@ class _TransactionPageState extends State<TransactionPage>
|
||||
pinned: true,
|
||||
backgroundColor: AppColor.primary,
|
||||
centerTitle: false,
|
||||
flexibleSpace: TransactionAppBar(
|
||||
rotationAnimation: _rotationAnimation,
|
||||
),
|
||||
flexibleSpace: CustomAppBar(title: 'Transaction', isBack: false),
|
||||
actions: [
|
||||
ActionIconButton(onTap: () {}, icon: LineIcons.filter),
|
||||
SpaceWidth(8),
|
||||
|
||||
Reference in New Issue
Block a user