Skip to content

Comments

feat: add copyWith method#125

Open
definitelyme wants to merge 3 commits intocmdrootaccess:mainfrom
definitelyme:feat/copyWith
Open

feat: add copyWith method#125
definitelyme wants to merge 3 commits intocmdrootaccess:mainfrom
definitelyme:feat/copyWith

Conversation

@definitelyme
Copy link

Example usage: create a blank Flushbar() and manually dismiss it somewhere else.

var fb = Flushbar(...);

fb = fb.copyWith(
   mainButton: TextButton(
       onPressed: () {
           fb.dismiss(); // dismiss it here
       }
   ),
);

fb.show(context);

Example usage: create a blank `Flushbar()` and manually dismiss it somewhere else.

```dart
var fb = Flushbar(...);
fb = fb.copyWith(
   mainButton: TextButton(
       onPressed: () {
           fb.dismiss();
       }
   ),
);

fb.show(context);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant