Skip to content

Commit

Permalink
const
Browse files Browse the repository at this point in the history
  • Loading branch information
VrushankBardolia committed Nov 23, 2023
1 parent e5cfad4 commit d2f0ef1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/screens/textInput.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ class _TextInputState extends State<TextInput> {
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(8),
padding: const EdgeInsets.all(8),
child: SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 4),
const SizedBox(height: 4),
TextField(
decoration: InputDecoration(
prefixIcon: prefix ? Icon(Icons.search) : null,
suffixIcon: suffix ? Icon(Icons.clear) : null,
prefixIcon: prefix ? const Icon(Icons.search) : null,
suffixIcon: suffix ? const Icon(Icons.clear) : null,
labelText: label ? 'Label Text' : null,
hintText: hint ? 'Hint Text' : null,
helperText: helper ? 'Helper Text' : null,
filled: fill,
border: outlined ? OutlineInputBorder() : null
border: outlined ? const OutlineInputBorder() : null
),
),

SwitchListTile(
title: Text('Filled'),
title: const Text('Filled'),
value: fill,
onChanged: (bool value){
setState(() {
Expand All @@ -46,7 +46,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Outline'),
title: const Text('Outline'),
value: outlined,
onChanged: (bool value){
setState(() {
Expand All @@ -55,7 +55,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Prefix Icon'),
title: const Text('Prefix Icon'),
value: prefix,
onChanged: (bool value){
setState(() {
Expand All @@ -64,7 +64,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Suffix Icon'),
title: const Text('Suffix Icon'),
value: suffix,
onChanged: (bool value){
setState(() {
Expand All @@ -73,7 +73,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Label Text'),
title: const Text('Label Text'),
value: label,
onChanged: (bool value){
setState(() {
Expand All @@ -82,7 +82,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Hint Text'),
title: const Text('Hint Text'),
value: hint,
onChanged: (bool value){
setState(() {
Expand All @@ -91,7 +91,7 @@ class _TextInputState extends State<TextInput> {
}
),
SwitchListTile(
title: Text('Helper Text'),
title: const Text('Helper Text'),
value: helper,
onChanged: (bool value){
setState(() {
Expand Down

0 comments on commit d2f0ef1

Please sign in to comment.