added wallet source to quotation preparation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pshared/models/payment/type.dart';
|
||||
import 'package:pshared/models/payment/wallet.dart';
|
||||
|
||||
import 'package:pweb/models/wallet.dart';
|
||||
import 'package:pweb/pages/payment_methods/icon.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
@@ -34,32 +34,28 @@ class _PaymentMethodDropdownState extends State<PaymentMethodDropdown> {
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DropdownButtonFormField<Wallet>(
|
||||
dropdownColor: Theme.of(context).colorScheme.onSecondary,
|
||||
initialValue: _selectedMethod,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context)!.whereGetMoney,
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
Widget build(BuildContext context) => DropdownButtonFormField<Wallet>(
|
||||
dropdownColor: Theme.of(context).colorScheme.onSecondary,
|
||||
initialValue: _selectedMethod,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context)!.whereGetMoney,
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
items: widget.methods.map((method) => DropdownMenuItem<Wallet>(
|
||||
value: method,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(iconForPaymentType(PaymentType.managedWallet), size: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(method.name),
|
||||
],
|
||||
),
|
||||
items: widget.methods.map((method) {
|
||||
return DropdownMenuItem<Wallet>(
|
||||
value: method,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(iconForPaymentType(PaymentType.managedWallet), size: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(method.name),
|
||||
],
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
if (value != null) {
|
||||
setState(() => _selectedMethod = value);
|
||||
widget.onChanged(value);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
)).toList(),
|
||||
onChanged: (value) {
|
||||
if (value != null) {
|
||||
setState(() => _selectedMethod = value);
|
||||
widget.onChanged(value);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user