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 with TickerProviderStateMixin { Widget build(BuildContext context) { bool isVibration = true; var bindValue; return Container( child: ListView(scrollDirection: Axis.vertical, children: [ 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: [ new Column( mainAxisAlignment: MainAxisAlignment.center, children: [ 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; }, ), ], ), ], ) ])) ])); } }