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.
137 lines
4.4 KiB
Dart
137 lines
4.4 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(
|
|
'Carnivore',
|
|
style: new TextStyle(fontSize: 16.0),
|
|
),
|
|
new Radio(
|
|
value: 0,
|
|
groupValue: bindValue,
|
|
onChanged: (value) {
|
|
bindValue = value;
|
|
},
|
|
),
|
|
],
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
new Text(
|
|
'Herbivore',
|
|
style: new TextStyle(
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
new Radio(
|
|
value: 1,
|
|
groupValue: bindValue,
|
|
onChanged: (value) {
|
|
bindValue = value;
|
|
},
|
|
)
|
|
],
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
new Text(
|
|
'Omnivore',
|
|
style: new TextStyle(fontSize: 16.0),
|
|
),
|
|
new Radio(
|
|
value: 2,
|
|
groupValue: bindValue,
|
|
onChanged: (value) {
|
|
bindValue = value;
|
|
},
|
|
),
|
|
],
|
|
),
|
|
],
|
|
)
|
|
]))
|
|
]));
|
|
}
|
|
}
|