A simple ( maybe not 😪) plugin for adding nigerian banks to your forms..... it's all vibes and inshallah, but it works good ( if it doesn't do what you are looking for, feel free to report an issue 😒 or just fork the damn thing 😜)
- Added list of banks and their logo ( it's 39 right now feel free to add more in lib/models/banks_list.dart) and oh don't forget to add logo into assets/images 😇
- Search widget with modes.
- You can now create your list of banks by assigning a
dart BankModel
list to thedart this.banks property
List<BankModel> banks = [BanksModel(name:"EleosBank", slug:"eleos_banks", logo:"https://eleeos.com/dummy.png", code:"281",ussd:"829")];
Banks(banks:banks);
- Selector (dropdown, bottom sheet and dialog modes)
- Search
s/n | Constructor |
---|---|
1 | Banks |
Banks({
Key key,
@required this.onInputChanged,
this.onInputValidated,
this.onSubmit,
this.onFieldSubmitted,
this.validator,
this.onSaved,
this.textFieldController,
this.keyboardAction,
this.initialValue,
this.hintText = 'Select Bank',
this.errorMessage = 'Select a bank from the list',
this.selectorButtonOnErrorPadding = 24,
this.maxLength = 15,
this.isEnabled = true,
this.showLogo = true,
this.autoFocus = false,
this.autoFocusSearch = false,
this.autoValidateMode = AutovalidateMode.disabled,
this.ignoreBlank = false,
this.bankSelectorScrollControlled = true,
this.locale,
this.textStyle,
this.selectorTextStyle,
this.inputBorder,
this.inputDecoration,
this.searchBoxDecoration,
this.focusNode,
this.banks,
this.selectorConfig
});
enum BankInputSelectorType { DROPDOWN, BOTTOM_SHEET, DIALOG }
BankModel({ this.name, this.slug, this.code, this.ussd, this.logo, });
SelectorConfig({
this.selectorType = BankInputSelectorType.BOTTOM_SHEET,
this.showLogo = true, this.showCode,
this.backgroundColor = Colors.white,
this.bankComparator,
});
Parameter | Type | Initial Value |
---|---|---|
onInputChanged | function(BankModel) | null |
onSaved | function(String) | null |
onInputValidated | function(bool) | null |
focusNode | FocusNode | null |
textFieldController | TextEditingController | TextEditingController() |
onSubmit | Function() | null |
keyboardAction | TextInputAction | null |
banks | List | null |
textStyle | TextStyle | null |
selectorTextStyle | TextStyle | null |
inputBorder | InputBorder | null |
inputDecoration | InputDecoration | null |
initialValue | BankModel | null |
hintText | String | Phone Number |
selectorButtonOnErrorPadding | double | 24 |
maxLength | integer | 15 |
isEnabled | boolean | true |
autoFocus | boolean | false |
autoValidateMode | AutoValidateMode | AutoValidateMode.disabled |
errorMessage | String | Invalid phone number |
selectorConfig | SelectorConfig | SelectorConfig() |
ignoreBlank | boolean | false |
searchBoxDecoration | InputDecoration | null |
bankSelectorScrollControlled | boolean | true |
If you encounter any problem or the library is missing a feature feel free to open an issue. Feel free to fork, improve the package and make pull request.
Made with contributors-img.
A special thanks to:
for the nigerian-banks repo
and to
for the intl_phone_number_input repo
Made with contributors-img.