Skip to content

Commit

Permalink
Appbar title fix for add product and edit product
Browse files Browse the repository at this point in the history
  • Loading branch information
kishan-dhankecha committed Apr 1, 2021
1 parent 3c03027 commit a4e7f56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Screens/EditProductScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class _EditProductScreenState extends State<EditProductScreen> {
final FocusNode _descriptionFocusNode = FocusNode();
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
var _isPageLoadedFirstTime = true;
String appBarTitle = 'Add';
final urlPattern =
r"(https?|ftp)://([-A-Z0-9.]+)(/[-A-Z0-9+&@#/%=~_|!:,.;]*)?(\?[A-Z0-9+&@#/%=~_|!:‌​,.;]*)?";
var testData = {
Expand Down Expand Up @@ -50,6 +51,7 @@ class _EditProductScreenState extends State<EditProductScreen> {
'description': _editedProduct.description,
'imgUrl': _editedProduct.imgUrl,
};
appBarTitle = 'Edit';
}
}
_isPageLoadedFirstTime = false;
Expand Down Expand Up @@ -82,8 +84,8 @@ class _EditProductScreenState extends State<EditProductScreen> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const AppLogoName(
firstName: 'Add',
title: AppLogoName(
firstName: appBarTitle,
lastName: 'Product',
),
actions: [
Expand Down

0 comments on commit a4e7f56

Please sign in to comment.