This commit is contained in:
Patrick Alvin Alcala 2025-02-14 14:47:46 +08:00
parent 4753926c34
commit d3a4b45603
9 changed files with 157 additions and 46 deletions

View file

@ -1,5 +1,3 @@
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:gap/gap.dart';
@ -26,7 +24,9 @@ class _MainPageState extends State<MainPage> {
bool userStatus = prefs.containsKey('user');
if (!userStatus) {
context.go('/');
if (mounted) {
context.go('/');
}
}
}
@ -51,6 +51,7 @@ class _MainPageState extends State<MainPage> {
resizeToAvoidBottomInset: false,
body: SingleChildScrollView(
child: PageBackgroundWidget(
height: MediaQuery.of(context).size.height + 400,
page: 'menu',
child: Center(
child: Column(
@ -90,6 +91,12 @@ class _MainPageState extends State<MainPage> {
onPressed: () => {context.push('/addstock')},
color: 'green'),
const Gap(32),
MenuWidget(
icon: FontAwesomeIcons.eraser,
text: 'Remove Stock',
onPressed: () => {context.push('/deletestock')},
color: 'red'),
const Gap(32),
MenuWidget(
icon: FontAwesomeIcons.listCheck,
text: 'List of Stocks',