Skip to content

Theme Toggler Drawer in Flutter - #49

Open
irahulcse wants to merge 4 commits into
divyanshub024:masterfrom
irahulcse:master
Open

Theme Toggler Drawer in Flutter#49
irahulcse wants to merge 4 commits into
divyanshub024:masterfrom
irahulcse:master

Conversation

@irahulcse

Copy link
Copy Markdown

The link of the dart pad is https://dartpad.dev/9abeece87fbd65cf36cf50084b91f5fc In this, I had implemented a drawer to toggle between dark theme and light theme in Flutter.

@irahulcse

Copy link
Copy Markdown
Author

@divyanshub024 Pls, have a look at it.

@divyanshub024

Copy link
Copy Markdown
Owner

Hey @irahulcse!! Thanks for your contribution but I cannot add this sample as setstate is not the right way to change theme dynamically which will reflect a whole app.

@irahulcse

Copy link
Copy Markdown
Author

Hi, @divyanshub024 I had updated the Dartpad.dev code. And it's working fine without the setState method. The link of the pad is https://dartpad.dev/4ffc9c4a0520ecb48e7c35a7983a7df3. Pls, have a look at it.

@divyanshub024

Copy link
Copy Markdown
Owner

@irahulcse There is 1 issue. check the logs.

Close instances of `dart.core.Sink` - line 53

@irahulcse

irahulcse commented Mar 30, 2020

Copy link
Copy Markdown
Author

Yes, This also bothered me. I am trying to solve it by reading different issues. But, till now it seems fine, Is this some kind of warning?
I am right now referring to the following:

  1. Close instances of dart.core.sink doesn't recognize close in cascade dart-lang/sdk#57403
  2. Close instances of dart.core.sink doesn't recognize close when using this dart-lang/sdk#57910

Referred this article for the syntax: https://medium.com/flutter-community/flutter-bloc-with-streams-6ed8d0a63bb8
In one of the issues, I had also read that if you moved to the analysis_options.yaml file present in the Flutter directory. In this also, very mentioned about the close.sinks.
Attaching the SC of that file:
image

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.

2 participants