You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/pages/settings/general_setting.dart

199 lines
6.3 KiB
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 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,
)
],
))
]));
}
}