Merge branch 'master' of https://github.com/jonataslaw/getx into sm-refactor
Showing
2 changed files
with
8 additions
and
6 deletions
| @@ -192,7 +192,7 @@ extension ExtensionDialog on GetInterface { | @@ -192,7 +192,7 @@ extension ExtensionDialog on GetInterface { | ||
| 192 | color: buttonColor ?? theme.colorScheme.secondary, | 192 | color: buttonColor ?? theme.colorScheme.secondary, | 
| 193 | width: 2, | 193 | width: 2, | 
| 194 | style: BorderStyle.solid), | 194 | style: BorderStyle.solid), | 
| 195 | - borderRadius: BorderRadius.circular(100)), | 195 | + borderRadius: BorderRadius.circular(radius)), | 
| 196 | ), | 196 | ), | 
| 197 | onPressed: () { | 197 | onPressed: () { | 
| 198 | onCancel?.call(); | 198 | onCancel?.call(); | 
| @@ -215,7 +215,7 @@ extension ExtensionDialog on GetInterface { | @@ -215,7 +215,7 @@ extension ExtensionDialog on GetInterface { | ||
| 215 | tapTargetSize: MaterialTapTargetSize.shrinkWrap, | 215 | tapTargetSize: MaterialTapTargetSize.shrinkWrap, | 
| 216 | backgroundColor: buttonColor ?? theme.colorScheme.secondary, | 216 | backgroundColor: buttonColor ?? theme.colorScheme.secondary, | 
| 217 | shape: RoundedRectangleBorder( | 217 | shape: RoundedRectangleBorder( | 
| 218 | - borderRadius: BorderRadius.circular(100)), | 218 | + borderRadius: BorderRadius.circular(radius)), | 
| 219 | ), | 219 | ), | 
| 220 | child: Text( | 220 | child: Text( | 
| 221 | textConfirm ?? "Ok", | 221 | textConfirm ?? "Ok", | 
| @@ -34,10 +34,12 @@ class RxSet<E> extends GetListenable<Set<E>> | @@ -34,10 +34,12 @@ class RxSet<E> extends GetListenable<Set<E>> | ||
| 34 | } | 34 | } | 
| 35 | 35 | ||
| 36 | @override | 36 | @override | 
| 37 | - bool add(E newValue) { | ||
| 38 | - final val = value.add(newValue); | ||
| 39 | - refresh(); | ||
| 40 | - return val; | 37 | + bool add(E value) { | 
| 38 | + final hasAdded = value.add(value); | ||
| 39 | + if (hasAdded) { | ||
| 40 | + refresh(); | ||
| 41 | + } | ||
| 42 | + return hasAdded; | ||
| 41 | } | 43 | } | 
| 42 | 44 | ||
| 43 | @override | 45 | @override | 
- 
Please register or login to post a comment