improvements.

merge-requests/22/head
Sikander Saleem 3 years ago
parent 534aab3ceb
commit 4f37bb9476

@ -1,9 +1,9 @@
class URLs{ class URLs{
URLs._(); URLs._();
static const host2 = "http://194.163.164.213/atoms/api"; static const host2 = "http://194.163.164.213/atoms/api";
// static const host1 = "https://atomsdev.hmg.com/api"; // uat url static const host1 = "https://atomsuat.hmg.com"; // uat url
static const host1 = "http://109.123.243.118:9000"; // static const host1 = "http://109.123.243.118:9000";
static String _baseUrl = "$_host/mobile"; static String _baseUrl = "$_host/mobile";

@ -53,7 +53,7 @@ class NotificationsProvider extends ChangeNotifier{
// userId = 397.toString(); // testing id to view data // userId = 397.toString(); // testing id to view data
try{ try{
response = await get( response = await get(
Uri.parse(host+URLs.getNotifications Uri.parse(URLs.getNotifications
+"?uid=${user.id}" +"?uid=${user.id}"
"&token=${user.token}" "&token=${user.token}"
"&page=${(notifications?.length ?? 0) ~/pageItemNumber}"), "&page=${(notifications?.length ?? 0) ~/pageItemNumber}"),

@ -330,13 +330,13 @@ class _LandPageState extends State<LandPage> {
), ),
], ],
), ),
DrawerItem( // DrawerItem(
icon: Icons.notifications, // icon: Icons.notifications,
title: _subtitle.notifications, // title: _subtitle.notifications,
onPressed: () { // onPressed: () {
Navigator.of(context).pushNamed(NotificationsPage.id); // Navigator.of(context).pushNamed(NotificationsPage.id);
}, // },
), // ),
DrawerItem( DrawerItem(
icon: Icons.mail, icon: Icons.mail,
title: _subtitle.email, title: _subtitle.email,

@ -43,18 +43,7 @@ class _AutoCompletePartsFieldState extends State<AutoCompletePartsField> {
_userProvider = Provider.of<UserProvider>(context); _userProvider = Provider.of<UserProvider>(context);
_partsProvider = Provider.of<PartsProvider>(context); _partsProvider = Provider.of<PartsProvider>(context);
//Subtitle _subtitle = AppLocalization.of(context).subtitle; //Subtitle _subtitle = AppLocalization.of(context).subtitle;
return LoadingManager( return Container(
isLoading: _partsProvider.isLoading,
isFailedLoading: _partsProvider.parts == null,
stateCode: _partsProvider.stateCode,
onRefresh: () async {
_partsProvider.reset();
await _partsProvider.getParts(
host: _settingProvider.host,
user: _userProvider.user,
);
},
child: Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16 horizontal: 16
), ),
@ -102,7 +91,6 @@ class _AutoCompletePartsFieldState extends State<AutoCompletePartsField> {
widget.onPick(part); widget.onPick(part);
}, },
), ),
),
); );
} }
} }

Loading…
Cancel
Save