fixed the expense screen neigation build issue
This commit is contained in:
parent
92f7fec083
commit
1c253df5f9
@ -32,7 +32,7 @@ class ExpenseAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios_new,
|
icon: const Icon(Icons.arrow_back_ios_new,
|
||||||
color: Colors.black, size: 20),
|
color: Colors.black, size: 20),
|
||||||
onPressed: () => Get.offNamed('/dashboard/finance'),
|
onPressed: () => Get.toNamed('/dashboard/finance'),
|
||||||
),
|
),
|
||||||
MySpacing.width(8),
|
MySpacing.width(8),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -126,12 +126,6 @@ getPageRoute() {
|
|||||||
page: () => Error404Screen(),
|
page: () => Error404Screen(),
|
||||||
middlewares: [AuthMiddleware()]),
|
middlewares: [AuthMiddleware()]),
|
||||||
|
|
||||||
// Finance
|
|
||||||
GetPage(
|
|
||||||
name: '/dashboard/finance',
|
|
||||||
page: () => FinanceScreen(),
|
|
||||||
middlewares: [AuthMiddleware()],
|
|
||||||
),
|
|
||||||
// Advance Payment
|
// Advance Payment
|
||||||
GetPage(
|
GetPage(
|
||||||
name: '/dashboard/advance-payment',
|
name: '/dashboard/advance-payment',
|
||||||
|
|||||||
@ -403,7 +403,7 @@ class _AppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios_new,
|
icon: const Icon(Icons.arrow_back_ios_new,
|
||||||
color: Colors.black, size: 20),
|
color: Colors.black, size: 20),
|
||||||
onPressed: () => Get.offAllNamed('/dashboard/expense-main-page'),
|
onPressed: () => Get.toNamed('/dashboard/expense-main-page'),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -32,7 +32,11 @@ class _ExpenseMainScreenState extends State<ExpenseMainScreen>
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_tabController = TabController(length: 2, vsync: this);
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
expenseController.fetchExpenses();
|
|
||||||
|
// Defer expense fetch to after first build
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
expenseController.fetchExpenses();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user