feat: custom appbar
This commit is contained in:
@@ -2,8 +2,8 @@ import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../components/appbar/appbar.dart';
|
||||
import '../../components/spacer/spacer.dart';
|
||||
import 'widgets/appbar.dart';
|
||||
import 'widgets/summary_card.dart';
|
||||
|
||||
// Data Models
|
||||
@@ -70,9 +70,6 @@ class SalesPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
late AnimationController rotationAnimationController;
|
||||
late Animation<double> rotationAnimation;
|
||||
|
||||
late AnimationController slideAnimationController;
|
||||
late Animation<Offset> slideAnimation;
|
||||
|
||||
@@ -82,23 +79,6 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// Rotation Animation
|
||||
rotationAnimationController = AnimationController(
|
||||
duration: const Duration(seconds: 20),
|
||||
vsync: this,
|
||||
);
|
||||
rotationAnimation =
|
||||
Tween<double>(
|
||||
begin: 0,
|
||||
end: 6.28, // 2 * PI
|
||||
).animate(
|
||||
CurvedAnimation(
|
||||
parent: rotationAnimationController,
|
||||
curve: Curves.linear,
|
||||
),
|
||||
);
|
||||
rotationAnimationController.repeat();
|
||||
|
||||
// Slide Animation
|
||||
slideAnimationController = AnimationController(
|
||||
duration: const Duration(milliseconds: 800),
|
||||
@@ -130,7 +110,6 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
rotationAnimationController.dispose();
|
||||
slideAnimationController.dispose();
|
||||
fadeAnimationController.dispose();
|
||||
super.dispose();
|
||||
@@ -187,7 +166,7 @@ class _SalesPageState extends State<SalesPage> with TickerProviderStateMixin {
|
||||
floating: false,
|
||||
pinned: true,
|
||||
backgroundColor: AppColor.primary,
|
||||
flexibleSpace: SalesAppbar(rotationAnimation: rotationAnimation),
|
||||
flexibleSpace: CustomAppBar(title: 'Penjualan'),
|
||||
),
|
||||
|
||||
// Date Range Header
|
||||
|
||||
Reference in New Issue
Block a user