Merge branch 'sultan' into 'diplomatic-quarter-live'
Sultan See merge request Cloud_Solution/diplomatic-quarter!106merge-update-with-lab-changes
commit
75c8950498
@ -0,0 +1,198 @@
|
||||
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 GeneralSettings extends StatefulWidget {
|
||||
@override
|
||||
_GeneralSettings createState() => _GeneralSettings();
|
||||
}
|
||||
|
||||
class _GeneralSettings extends State<GeneralSettings>
|
||||
with TickerProviderStateMixin {
|
||||
Widget build(BuildContext context) {
|
||||
bool isVibration = true;
|
||||
var bindValue;
|
||||
return Container(
|
||||
child: ListView(scrollDirection: Axis.vertical, children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: AppText(
|
||||
'Modes',
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('Vibration touch feedback'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('Accsibility Mode'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: AppText(
|
||||
'Modes for Partially Blind',
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
new Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
new Text(
|
||||
'Off',
|
||||
style: new TextStyle(fontSize: 16.0),
|
||||
),
|
||||
new Radio(
|
||||
value: 0,
|
||||
groupValue: bindValue,
|
||||
onChanged: (value) {
|
||||
bindValue = value;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
new Text(
|
||||
'Invert',
|
||||
style: new TextStyle(
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
new Radio(
|
||||
value: 1,
|
||||
groupValue: bindValue,
|
||||
onChanged: (value) {
|
||||
bindValue = value;
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
new Text(
|
||||
'Dim',
|
||||
style: new TextStyle(fontSize: 16.0),
|
||||
),
|
||||
new Radio(
|
||||
value: 2,
|
||||
groupValue: bindValue,
|
||||
onChanged: (value) {
|
||||
bindValue = value;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
new Text(
|
||||
'Black and White',
|
||||
style: new TextStyle(fontSize: 16.0),
|
||||
),
|
||||
new Radio(
|
||||
value: 2,
|
||||
groupValue: bindValue,
|
||||
onChanged: (value) {
|
||||
bindValue = value;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
])),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: AppText(
|
||||
'Permission',
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('Camera'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('Location'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
))
|
||||
]));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,182 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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 ProfileSettings extends StatefulWidget {
|
||||
@override
|
||||
_ProfileSettings createState() => _ProfileSettings();
|
||||
}
|
||||
|
||||
class _ProfileSettings extends State<ProfileSettings>
|
||||
with TickerProviderStateMixin {
|
||||
Widget build(BuildContext context) {
|
||||
bool isVibration = true;
|
||||
var language = 1;
|
||||
return Container(
|
||||
child: ListView(scrollDirection: Axis.vertical, children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AppText(
|
||||
'File No',
|
||||
color: Colors.black,
|
||||
),
|
||||
AppText(
|
||||
'124545',
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 1,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Container(
|
||||
color: Colors.grey[300],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
child: AppText('SMS and Confirmation Calls Language ',
|
||||
fontWeight: FontWeight.bold),
|
||||
padding: EdgeInsets.all(10),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AppText('English'),
|
||||
new Radio(
|
||||
value: 2,
|
||||
groupValue: language,
|
||||
onChanged: (value) {
|
||||
language = value;
|
||||
},
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AppText('Arabic'),
|
||||
new Radio(
|
||||
value: 1,
|
||||
groupValue: language,
|
||||
onChanged: (value) {
|
||||
language = value;
|
||||
},
|
||||
)
|
||||
],
|
||||
)),
|
||||
Padding(
|
||||
child: AppText('Alert'),
|
||||
padding: EdgeInsets.all(10),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AppText('Alert by Email'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
AppText('Alert by SMS'),
|
||||
Switch(
|
||||
value: isVibration,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isVibration = value;
|
||||
});
|
||||
},
|
||||
activeTrackColor: Colors.lightGreenAccent,
|
||||
activeColor: Colors.green,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Padding(
|
||||
child: AppText('Alert'),
|
||||
padding: EdgeInsets.all(10),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText('Email'),
|
||||
TextField(
|
||||
style: TextStyle(color: Colors.red),
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText('Emergency contact name'),
|
||||
TextField(
|
||||
style: TextStyle(color: Colors.red),
|
||||
decoration: InputDecoration(
|
||||
suffixIcon: Icon(Icons.edit),
|
||||
))
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText('Emergency contact number'),
|
||||
TextField(
|
||||
style: TextStyle(color: Colors.red),
|
||||
decoration: InputDecoration(
|
||||
suffixIcon: Icon(Icons.edit),
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).submit,
|
||||
() {
|
||||
// print(mobileNo.text);
|
||||
},
|
||||
)),
|
||||
],
|
||||
))
|
||||
]));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/pages/settings/profile_setting.dart';
|
||||
import 'package:diplomaticquarterapp/pages/settings/general_setting.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Settings extends StatefulWidget {
|
||||
final int type;
|
||||
|
||||
Settings({this.type = 0});
|
||||
@override
|
||||
_Settings createState() => _Settings();
|
||||
}
|
||||
|
||||
class _Settings extends State<Settings> with TickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController =
|
||||
new TabController(length: 2, vsync: this, initialIndex: widget.type);
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AppGlobal.context = context;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
bottom: TabBar(
|
||||
tabs: [
|
||||
Tab(text: TranslationBase.of(context).general),
|
||||
Tab(
|
||||
text: TranslationBase.of(context).profile,
|
||||
)
|
||||
],
|
||||
controller: _tabController,
|
||||
),
|
||||
title: Text(TranslationBase.of(context).settings,
|
||||
style: TextStyle(color: Colors.white)),
|
||||
leading: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return ArrowBack();
|
||||
},
|
||||
),
|
||||
),
|
||||
body: TabBarView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
children: [GeneralSettings(), ProfileSettings()],
|
||||
controller: _tabController),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue