|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class Login extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
_Login createState() => _Login();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _Login extends State<Login> {
|
|
|
|
final TextEditingController nationalIDorFile = null;
|
|
|
|
final int loginType = LoginType.loginType;
|
|
|
|
final TextEditingController mobileNo = null;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AppScaffold(
|
|
|
|
appBarTitle: TranslationBase.of(context).login,
|
|
|
|
isShowAppBar: true,
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.only(top: 10, left: 20, right: 20),
|
|
|
|
height: SizeConfig.realScreenHeight * .8,
|
|
|
|
width: SizeConfig.realScreenWidth,
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
child: AppText(
|
|
|
|
TranslationBase.of(context).enterNationalId,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3.5,
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: <Widget>[
|
|
|
|
MobileNo(controller: mobileNo),
|
|
|
|
Container(
|
|
|
|
child: TextFields(
|
|
|
|
controller: nationalIDorFile,
|
|
|
|
prefixIcon: Icon(
|
|
|
|
loginType == 1
|
|
|
|
? Icons.receipt
|
|
|
|
: Icons.chrome_reader_mode,
|
|
|
|
color: Colors.red),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
hintText: loginType == 1
|
|
|
|
? TranslationBase.of(context).fileNo
|
|
|
|
: TranslationBase.of(context).nationalID,
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: <Widget>[
|
|
|
|
Row(
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: RaisedButton(
|
|
|
|
color: Colors.grey,
|
|
|
|
textColor: Colors.white,
|
|
|
|
child: Text(TranslationBase.of(context).login),
|
|
|
|
onPressed: () => {},
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
}
|