29 lines
591 B
Dart
29 lines
591 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
|
|
class PaymentAmountProvider with ChangeNotifier {
|
|
double _amount = 10.0;
|
|
bool _payerCoversFee = true;
|
|
bool _isEditing = false;
|
|
|
|
double get amount => _amount;
|
|
bool get payerCoversFee => _payerCoversFee;
|
|
bool get isEditing => _isEditing;
|
|
|
|
void setAmount(double value) {
|
|
_amount = value;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setPayerCoversFee(bool value) {
|
|
_payerCoversFee = value;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setEditing(bool value) {
|
|
if (_isEditing == value) return;
|
|
_isEditing = value;
|
|
notifyListeners();
|
|
}
|
|
}
|