Featured Image
Software Development

Flutter Slider šŸŽš + Emojis šŸŒ» =Ā šŸ’™

Photo by Kelvin Yan on Unsplash


Slider widget from the material library is used to select a value from a range of values.



What if I told you, we can useĀ emojisĀ as values forĀ labelĀ parameter in Slider widget?!

You can use codepoints of an emoji or a package likeĀ demojiĀ to display emojis in the sliderā€™s label.

  • Codepoints for (Blue heart emoji) isĀ U+1F499. So you can set labelā€™s value toĀ u{1F499}Ā to display a .



  • If youā€™re usingĀ demojiĀ package then you can set labelā€™s value toĀ Demoji.blue_heart.



Here is another example in which different emojis are shown for different values.

  • Iā€™m usingĀ demojiĀ package for this example.
  • Switch case is used to show different emoji for every value.
  • Here is theĀ list of emojis available in this package.
  • This kind of slider can be used on the review page of an app. ( Food Review, Product Review, etc.)




Thatā€™s it for this one. Thank you for reading this

You can check out the source code of the app here. Feel free to contribute to the project by creating issues or sending pull-requests.

If you enjoyed reading this blog post, please take a moment to read our blog on creating a user-friendly certificate generator app with Flutter.

author
Tirth Patel
I'm a Flutter App Developer at Aubergine Solutions Pvt. Ltd. I'm passionate about mobile application development & open-source technologies. My expertise includes Dart, Flutter, Python, Git, Firebase, SQLite, Java. This year I was nominated as a recommended candidate to attend Google I/O 2019 conference from the Google India Scholars community. (Google India Challenge Scholarship 2018) I've delivered several talks in local communities on topics ranging from Functional Programming in Dart to Getting Started with Flutter.