feat: custom appbar
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
import 'widgets/appbar.dart';
|
||||
import '../../components/appbar/appbar.dart';
|
||||
import 'widgets/purchase_tile.dart';
|
||||
import 'widgets/stat_card.dart';
|
||||
import 'widgets/status_chip.dart';
|
||||
@@ -18,9 +18,7 @@ class PurchasePage extends StatefulWidget {
|
||||
|
||||
class _PurchasePageState extends State<PurchasePage>
|
||||
with TickerProviderStateMixin {
|
||||
late AnimationController rotationAnimation;
|
||||
late AnimationController cardAnimation;
|
||||
late AnimationController floatingAnimation;
|
||||
String selectedFilter = 'Semua';
|
||||
final List<String> filterOptions = [
|
||||
'Semua',
|
||||
@@ -67,29 +65,18 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
rotationAnimation = AnimationController(
|
||||
duration: const Duration(seconds: 20),
|
||||
vsync: this,
|
||||
)..repeat();
|
||||
|
||||
cardAnimation = AnimationController(
|
||||
duration: const Duration(milliseconds: 1200),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
floatingAnimation = AnimationController(
|
||||
duration: const Duration(seconds: 3),
|
||||
vsync: this,
|
||||
)..repeat(reverse: true);
|
||||
|
||||
cardAnimation.forward();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
rotationAnimation.dispose();
|
||||
cardAnimation.dispose();
|
||||
floatingAnimation.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -106,10 +93,7 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
elevation: 0,
|
||||
backgroundColor: AppColor.primary,
|
||||
|
||||
flexibleSpace: PurchaseAppbar(
|
||||
rotationAnimation: rotationAnimation,
|
||||
floatingAnimation: floatingAnimation,
|
||||
),
|
||||
flexibleSpace: CustomAppBar(title: 'Pembelian'),
|
||||
),
|
||||
|
||||
// Stats Cards
|
||||
|
||||
Reference in New Issue
Block a user