copy right & cloud logo are hard coded now.

development
Sikander Saleem 5 years ago
parent 8df6237d02
commit d7978a040b

@ -39,24 +39,24 @@ class _CommonAppbarState extends State<CommonAppbar> {
getPrefs(); getPrefs();
getNavigation(); getNavigation();
getQuickLinks(); getQuickLinks();
getCopyRight(); //getCopyRight();
} }
void getCopyRight() async { // void getCopyRight() async {
if (AppState().getContentInfoModel == null) { // if (AppState().getContentInfoModel == null) {
try { // try {
var model = await TangheemUserApiClient().getContentInfo(3); // var model = await TangheemUserApiClient().getContentInfo(3);
var contentList = model?.data ?? []; // var contentList = model?.data ?? [];
if (contentList.length > 0) { // if (contentList.length > 0) {
_copyRight = contentList.first; // _copyRight = contentList.first;
AppState().setContentInfoModel(_copyRight); // AppState().setContentInfoModel(_copyRight);
} // }
} catch (ex) {} // } catch (ex) {}
} else { // } else {
_copyRight = AppState().getContentInfoModel; // _copyRight = AppState().getContentInfoModel;
} // }
setState(() {}); // setState(() {});
} // }
void getNavigation() async { void getNavigation() async {
if (AppState().getNavigationModel?.data == null) { if (AppState().getNavigationModel?.data == null) {
@ -272,13 +272,13 @@ class _CommonAppbarState extends State<CommonAppbar> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
_copyRight.content ?? "", "Powered by Cloud Solutions",
maxLines: 1, maxLines: 1,
textAlign: TextAlign.right, textAlign: TextAlign.right,
style: TextStyle(fontSize: 14), style: TextStyle(fontSize: 14),
), ),
SizedBox(width: 8), SizedBox(width: 8),
Image.network(_copyRight.exposeFilePath, width: 30, height: 30) SvgPicture.asset("assets/logos/cloud_logo.svg", width: 30, height: 30)
], ],
), ),
) )

Loading…
Cancel
Save