lots of fixes

This commit is contained in:
2024-04-07 19:51:58 -05:00
parent 7b0ac130f8
commit 2728d612d4
15 changed files with 55 additions and 203 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ class _CreateBusinessDetailState extends State<BusinessDetail> {
leading: ClipRRect(
borderRadius: BorderRadius.circular(6.0),
child: Image.network(
'https://$apiAddress/fbla-api/logos/${business.id}',
'$apiAddress/logos/${business.id}',
width: 48,
height: 48, errorBuilder: (BuildContext context,
Object exception, StackTrace? stackTrace) {
+20 -13
View File
@@ -180,7 +180,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Business Name',
labelText: 'Business Name (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -199,17 +199,19 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
AutovalidateMode.onUserInteraction,
keyboardType: TextInputType.url,
onChanged: (inputUrl) {
business.website = Uri.encodeFull(inputUrl
.toLowerCase()
.replaceAll('https://', '')
.replaceAll('http://', '')
.replaceAll('www.', ''));
setState(() {
business.website = Uri.encodeFull(inputUrl
.toLowerCase()
.replaceAll('https://', '')
.replaceAll('http://', '')
.replaceAll('www.', ''));
});
},
onTapOutside: (PointerDownEvent event) {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Website',
labelText: 'Website (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -227,6 +229,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
autovalidateMode:
AutovalidateMode.onUserInteraction,
maxLength: 500,
maxLines: null,
onChanged: (inputDesc) {
setState(() {
business.description = inputDesc;
@@ -236,7 +239,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Business Description',
labelText: 'Business Description (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -332,7 +335,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Location Name (optional)',
labelText: 'Location Name',
),
),
),
@@ -350,7 +353,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Location Address (optional)',
labelText: 'Location Address',
),
),
),
@@ -380,6 +383,9 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
DropdownMenuEntry(
value: BusinessType.manufacturing,
label: 'Manufacturing'),
DropdownMenuEntry(
value: BusinessType.entertainment,
label: 'Entertainment'),
DropdownMenuEntry(
value: BusinessType.other,
label: 'Other'),
@@ -404,7 +410,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
},
decoration: const InputDecoration(
labelText:
'Contact Information Name (optional)',
'Contact Information Name',
),
),
),
@@ -439,7 +445,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Contact Email (optional)',
labelText: 'Contact Email',
),
validator: (value) {
if (value != null) {
@@ -463,6 +469,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
child: TextFormField(
controller: _notesController,
maxLength: 300,
maxLines: null,
onSaved: (inputText) {
business.notes = inputText!;
},
@@ -470,7 +477,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Other Notes (optional)',
labelText: 'Other Notes',
),
),
),