Merge branch 'master' of https://gitlab.com/Cloud_Solution/driver-app into design_changes

merge_design_canges_into_dev^2
hussam al-habibeh 5 years ago
commit 4b77d2d787

@ -79,4 +79,8 @@ class AuthenticationViewModel with ChangeNotifier {
notifyListeners();
}
}
logout() async {
await sharedPref.clear();
}
}

@ -1,17 +1,21 @@
import 'package:driverapp/core/viewModels/authentication_view_model.dart';
import 'package:driverapp/pages/authentication/login_page.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class SettingPage extends StatelessWidget {
final String driverName;//_authenticationViewModel.user.userName
final String driverName; //_authenticationViewModel.user.userName
final int driverID;
AuthenticationViewModel _authenticationViewModel;
SettingPage({this.driverName, this.driverID});
@override
Widget build(BuildContext context) {
_authenticationViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
appBarColor: Color(0xff30B7B9),
@ -73,6 +77,15 @@ class SettingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
InkWell(
onTap: () async {
await _authenticationViewModel.logout();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LoginPage()
),
);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[

@ -34,7 +34,7 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
body: SingleChildScrollView(
child: Center(
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
FractionallySizedBox(
widthFactor: 0.80,
@ -49,16 +49,16 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
Container(
child: Icon(
DriverApp.logo,
size: 110,
size: 120,
color: Colors.white,
),
margin: EdgeInsets.only(
right: projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width * 0.15,
: MediaQuery.of(context).size.width * 0.20,
left: !projectViewModel.isArabic
? 0
: MediaQuery.of(context).size.width * 0.15),
: MediaQuery.of(context).size.width * 0.10),
),
],
),
@ -92,7 +92,7 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
],
),
SizedBox(
height: 280,
height: 100,
)
],
),

Loading…
Cancel
Save