update
This commit is contained in:
parent
064814e165
commit
47a2d34933
2 changed files with 62 additions and 64 deletions
|
|
@ -28,7 +28,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
bool _isLoading = false;
|
||||
|
||||
void _signIn() async {
|
||||
if (_isLoading) return;
|
||||
// if (_isLoading) return;
|
||||
|
||||
final email = _emailController.text;
|
||||
final password = _passwordController.text;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/auth/auth_service.dart';
|
|||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/menu_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||
|
||||
|
|
@ -17,18 +18,12 @@ class MainPage extends StatelessWidget {
|
|||
final authService = AuthService();
|
||||
|
||||
void signOut() async {
|
||||
await authService.signOut().then((_) => {context.push('/')});
|
||||
await authService.signOut().then((_) => {context.push('/'), showNotification(context, 'Logged Out', true)});
|
||||
}
|
||||
|
||||
void gotoAddMedicine() {
|
||||
context.push('/addmedicines');
|
||||
}
|
||||
|
||||
void gotoAddGenerics() {
|
||||
context.push('/addgenerics');
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: SingleChildScrollView(
|
||||
child: PageBackgroundWidget(
|
||||
|
|
@ -54,12 +49,15 @@ class MainPage extends StatelessWidget {
|
|||
color: 'blue'),
|
||||
const Gap(16),
|
||||
MenuWidget(
|
||||
icon: FontAwesomeIcons.squarePlus, text: 'Add Generics', onPressed: gotoAddGenerics, color: 'blue'),
|
||||
icon: FontAwesomeIcons.squarePlus,
|
||||
text: 'Add Generics',
|
||||
onPressed: () => {context.push('/addgenerics')},
|
||||
color: 'blue'),
|
||||
const Gap(32),
|
||||
MenuWidget(
|
||||
icon: FontAwesomeIcons.squarePlus,
|
||||
text: 'Add Medicine',
|
||||
onPressed: gotoAddMedicine,
|
||||
onPressed: () => {context.push('/addmedicines')},
|
||||
color: 'green'),
|
||||
const Gap(16),
|
||||
MenuWidget(
|
||||
|
|
@ -83,6 +81,6 @@ class MainPage extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue