TextEditingApp icon indicating copy to clipboard operation
TextEditingApp copied to clipboard

Feature Request : Make a Custom SnackBar Widget

Open may-tas opened this issue 1 year ago • 20 comments

Is your feature request related to a problem? Please describe.

  • The app currently uses a default Snackbar, but the implementation involves bulky code and frequent use of BuildContext, which is not considered best practice.

Describe the solution you'd like

  • We would like to create a custom Snackbar widget that aligns with the app's color scheme and overall UI design. This will help streamline usage and improve code quality across the app.

Approach to be followed

  • Create a utils directory.
  • Inside it, create a file named custom_snackbar.dart.
  • Implement a reusable custom snackbar widget with no external package dependencies

Additional context

  • The custom snackbar should support three types of states:
    • Success
    • Info
    • Error
  • Each state should have its own visual style consistent with the app's theme.
  • Update the app's code wherever the old ScaffoldMessenger approach is being used with our new custom snackbar widget.

may-tas avatar Jul 25 '25 14:07 may-tas

Thank you for opening this issue! 🚀 Our team will review it soon. Please make sure you've included all relevant details and followed our Contributing Guidelines. For questions about our project, check out our README and Code of Conduct.

github-actions[bot] avatar Jul 25 '25 14:07 github-actions[bot]

@debasmitaas would you like to work on this?

may-tas avatar Jul 25 '25 14:07 may-tas

Sure!

debasmitaas avatar Jul 25 '25 17:07 debasmitaas

Assigned. Go ahead.

may-tas avatar Jul 25 '25 17:07 may-tas

@debasmitaas Kindly Star this project, It helps the project's reach. Thank you.

may-tas avatar Jul 26 '25 16:07 may-tas

@debasmitaas Kindly Star this project, It helps the project's reach. Thank you.

Okay done , btw, Can you please elaborate as to when do you want the snack-bar messages to pop up? like when a text is added , edited or other functions? Also if you could describe what message you would want to display there?it would give me a better idea.

debasmitaas avatar Jul 26 '25 17:07 debasmitaas

@debasmitaas first complete the custom snack bar. For the use cases, check the codebase and see if there is anywhere we have used the default ScaffoldMessenger, then replace it with custom snackbar. Just do this for now, as the app gets bigger we will have more uses for the snackbar, just make sure the UI/UX is similar to our app.

may-tas avatar Jul 26 '25 18:07 may-tas

@debasmitaas Are you still working on it ? Do reply by today, else I'll assign it to someone else.

may-tas avatar Jul 31 '25 12:07 may-tas

@debasmitaas Are you still working on it ? Do reply by today, else I'll assign it to someone else.

Yes , I'm working on it.

debasmitaas avatar Jul 31 '25 14:07 debasmitaas

@may-tas hello , I have some queries regarding this issue, i am working on it and have removed the default scaffoldmessenger wherever i could find. will that be okay?? because when i go to open a pr it asks for screenshots but since the default snackbar hasn't been used anywhere(like for saving, editing etc) , i cannot show any changes. In that case , can i just open the pr or do i need it show messages too??

debasmitaas avatar Aug 01 '25 17:08 debasmitaas

Yes its fine, You can just add a snackbar for testing, in the video. Basically for showing the UI, you can add a snackbar call at the start of the app, just for the screen recording. later you can remove that snacbar.

@debasmitaas

may-tas avatar Aug 01 '25 17:08 may-tas

Okay, i will get back to you soon

debasmitaas avatar Aug 01 '25 17:08 debasmitaas

@may-tas I created a test page to test the snackbars...i am attaching the screenshots below...please let me know if these are good?

Image

Image

Image

debasmitaas avatar Aug 03 '25 09:08 debasmitaas

@debasmitaas These are too excessive. The icons are duplicated, like info, success icons are used 2 times, which is weird. Also, the UI/UX of our app is white, greyish and black, basically very simple. Kindly make a simple snackbar.

may-tas avatar Aug 03 '25 11:08 may-tas

@debasmitaas These are too excessive. The icons are duplicated, like info, success icons are used 2 times, which is weird. Also, the UI/UX of our app is white, greyish and black, basically very simple. Kindly make a simple snackbar.

Alright...are these okay?

Image

debasmitaas avatar Aug 03 '25 12:08 debasmitaas

@debasmitaas perfect. Raise a PR, and you can remove the test page.

may-tas avatar Aug 03 '25 20:08 may-tas

@debasmitaas This is exactly what i had in mind, simple and neat.

may-tas avatar Aug 03 '25 20:08 may-tas

@debasmitaas perfect. Raise a PR, and you can remove the test page.

Okay, now this custom snackbar is implemented in undo,redo , text adding and text updating in the main canvas screen! I'm opening a pr soon

Image

debasmitaas avatar Aug 04 '25 03:08 debasmitaas

Don't add snacbar for text element added or updated. undo, redone, background color changed and clear canvas (trash icon) keep it for only this as of now. @debasmitaas

may-tas avatar Aug 04 '25 06:08 may-tas

@may-tas Okay Done, I opened a PR please check it out

debasmitaas avatar Aug 04 '25 14:08 debasmitaas