|
|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
@ -8,6 +10,8 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../splashPage.dart';
|
|
|
|
|
|
|
|
|
|
class NotAutPage extends StatelessWidget {
|
|
|
|
|
final String title;
|
|
|
|
|
final String description;
|
|
|
|
|
@ -99,8 +103,9 @@ class NotAutPage extends StatelessWidget {
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.9,
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
onTap: () => Navigator.pushReplacement(
|
|
|
|
|
context, FadePage(page: LoginType())),
|
|
|
|
|
onTap: (){
|
|
|
|
|
loginCheck(context);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).serviceInformationButton,
|
|
|
|
|
textColor: Theme.of(context).backgroundColor),
|
|
|
|
|
),
|
|
|
|
|
@ -109,4 +114,16 @@ class NotAutPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loginCheck(context) async{
|
|
|
|
|
var data = await sharedPref.getObject(IMEI_USER_DATA);
|
|
|
|
|
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
|
|
|
|
|
if (data != null) {
|
|
|
|
|
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
WELCOME_LOGIN,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|