mirror of
https://github.com/Iconica-Development/flutter_profile.git
synced 2025-05-19 01:03:45 +02:00
Fixed comments
This commit is contained in:
parent
2f633eff7c
commit
29a90a377b
2 changed files with 7 additions and 14 deletions
|
@ -19,12 +19,9 @@ class ItemBuilder {
|
|||
);
|
||||
|
||||
late InputDecoration inputDecoration;
|
||||
if (options.inputDecorationField != null &&
|
||||
options.inputDecorationField![key] != null) {
|
||||
inputDecoration = options.inputDecorationField![key]!;
|
||||
} else {
|
||||
inputDecoration = options.inputDecoration;
|
||||
}
|
||||
|
||||
inputDecoration =
|
||||
options.inputDecorationField?[key] ?? options.inputDecoration;
|
||||
|
||||
return Form(
|
||||
key: formKey,
|
||||
|
@ -39,11 +36,7 @@ class ItemBuilder {
|
|||
}
|
||||
},
|
||||
validator: (value) {
|
||||
if (options.validators != null &&
|
||||
options.validators![key] != null) {
|
||||
return options.validators![key]!(value);
|
||||
}
|
||||
return null;
|
||||
return options.validators?[key]?.call(value);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
/// ItemBuilderOptions is a class to store all settings for a field in the profile page.
|
||||
///
|
||||
///
|
||||
/// InputDecoration sets the decoration for all standard textfields. This is overridden if a field specific decoration is set by inputDecorationField.
|
||||
///
|
||||
///
|
||||
/// inputDecorationField sets the inputdecoration by key of the user data field. So a field can have its own specific decoration.
|
||||
///
|
||||
///
|
||||
/// Validator can be used to set a validator for the standard textfield.
|
||||
class ItemBuilderOptions {
|
||||
ItemBuilderOptions({
|
||||
|
|
Loading…
Reference in a new issue