|
|
|
|
@ -29,7 +29,6 @@ import 'package:diplomaticquarterapp/uitl/location_util.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
|
|
|
|
|
@ -242,7 +241,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
pageController = PageController(keepPage: true);
|
|
|
|
|
_firebaseMessaging.setAutoInitEnabled(true);
|
|
|
|
|
|
|
|
|
|
// signalRUtil = new SignalRUtil(hubName: "http://192.168.8.101:5001/chatHub", context: context);
|
|
|
|
|
signalRUtil = new SignalRUtil(hubName: "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273", context: context);
|
|
|
|
|
|
|
|
|
|
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
|
|
|
|
|
@ -250,7 +248,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
|
|
|
|
|
familyFileProvider.getSharedRecordByStatus();
|
|
|
|
|
}
|
|
|
|
|
signalRUtil.startSignalRConnection();
|
|
|
|
|
if (!signalRUtil.getConnectionState()) signalRUtil.startSignalRConnection();
|
|
|
|
|
});
|
|
|
|
|
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
|
|
|
|
|
//for now commented to reduce this call will enable it when needed
|
|
|
|
|
@ -507,91 +505,93 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
model = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
// currentTab == 0 ? 45 : 0.0
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: currentTab == 0 ? PreferredSize(
|
|
|
|
|
preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0),
|
|
|
|
|
child: AppBar(
|
|
|
|
|
elevation: 0,
|
|
|
|
|
backgroundColor: CustomColors.backgroudGreyColor,
|
|
|
|
|
textTheme: TextTheme(
|
|
|
|
|
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
title: Text(
|
|
|
|
|
getText(currentTab).toUpperCase(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
|
|
|
|
|
// bold: true,
|
|
|
|
|
),
|
|
|
|
|
leading: Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return new Stack(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
currentTab == 0
|
|
|
|
|
? IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new/menu.svg"),
|
|
|
|
|
color: Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
|
)
|
|
|
|
|
: IconButton(
|
|
|
|
|
icon: Icon(Icons.arrow_back),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
currentTab = 0;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
pageController.jumpToPage(0);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
|
|
|
|
|
? new Positioned(
|
|
|
|
|
right: projectViewModel.isArabic ? 35 : 0,
|
|
|
|
|
top: 5,
|
|
|
|
|
child: new Container(
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
decoration: new BoxDecoration(
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
|
minWidth: 20,
|
|
|
|
|
minHeight: 20,
|
|
|
|
|
),
|
|
|
|
|
child: new Text(
|
|
|
|
|
model.notificationsCount.toString(),
|
|
|
|
|
style: new TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: projectViewModel.isArabic ? 8 : 9,
|
|
|
|
|
appBar: currentTab == 0
|
|
|
|
|
? PreferredSize(
|
|
|
|
|
preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0),
|
|
|
|
|
child: AppBar(
|
|
|
|
|
elevation: 0,
|
|
|
|
|
backgroundColor: CustomColors.backgroudGreyColor,
|
|
|
|
|
textTheme: TextTheme(
|
|
|
|
|
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
title: Text(
|
|
|
|
|
getText(currentTab).toUpperCase(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
|
|
|
|
|
// bold: true,
|
|
|
|
|
),
|
|
|
|
|
leading: Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return new Stack(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
currentTab == 0
|
|
|
|
|
? IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new/menu.svg"),
|
|
|
|
|
color: Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
|
|
|
)
|
|
|
|
|
: IconButton(
|
|
|
|
|
icon: Icon(Icons.arrow_back),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
currentTab = 0;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
pageController.jumpToPage(0);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()
|
|
|
|
|
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
|
|
|
|
|
? new Positioned(
|
|
|
|
|
right: projectViewModel.isArabic ? 35 : 0,
|
|
|
|
|
top: 5,
|
|
|
|
|
child: new Container(
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
decoration: new BoxDecoration(
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
|
minWidth: 20,
|
|
|
|
|
minHeight: 20,
|
|
|
|
|
),
|
|
|
|
|
child: new Text(
|
|
|
|
|
model.notificationsCount.toString(),
|
|
|
|
|
style: new TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: projectViewModel.isArabic ? 8 : 9,
|
|
|
|
|
),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
actions: [
|
|
|
|
|
// IconButton(
|
|
|
|
|
// //iconSize: 70,
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// projectViewModel.isLogin ? Icons.settings : Icons.login,
|
|
|
|
|
// color: Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// if (projectViewModel.isLogin)
|
|
|
|
|
// Navigator.of(context).pushNamed(
|
|
|
|
|
// SETTINGS,
|
|
|
|
|
// );
|
|
|
|
|
// else
|
|
|
|
|
// login();
|
|
|
|
|
// }, //do something,
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
actions: [
|
|
|
|
|
// IconButton(
|
|
|
|
|
// //iconSize: 70,
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// projectViewModel.isLogin ? Icons.settings : Icons.login,
|
|
|
|
|
// color: Theme.of(context).textTheme.headline1.color,
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// if (projectViewModel.isLogin)
|
|
|
|
|
// Navigator.of(context).pushNamed(
|
|
|
|
|
// SETTINGS,
|
|
|
|
|
// );
|
|
|
|
|
// else
|
|
|
|
|
// login();
|
|
|
|
|
// }, //do something,
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
),
|
|
|
|
|
) : null,
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
drawer: SafeArea(child: AppDrawer()),
|
|
|
|
|
extendBody: false,
|
|
|
|
|
body: WillPopScope(
|
|
|
|
|
|