Flutter Tips 85-91

July 5, 2020 • ☕️ 4 min read

#Day85 Neumorphic Design with clay_containers

clay_containers makes it easy to build Neumorphic UI.

  1. Add dependency

    dependencies: clay_containers: ^version

  2. Start using

            color: baseColor,
            height: 200,
            width: 200,
            child:Center(child:newChild) //Put child inside Center to align it centrally.
            depth:45, // negative elevation(both +ve & -ve)
            curveType: CurveType.convex, //Curve of surface (concave, convex, plane)
            borderRadius: 200,


see xbox controller demo

visit clay_containers

#Day 86 provider

Passing an object/bloc from a parent widget to it’s children across the widget tree by passing it through every Widget constructor between parent and the reciever child is hard.

With provider you can easily pass object/bloc from parent to any widget below it in widget tree.

  1. Add dependency
provider: ^4.1.3
  1. Pass object/model/bloc from Parent Widget by wrapping any widget with Provider.
  Widget build(BuildContext context) {
    return Provider(
      create:(_)=> User("erluxman"),
      child: ScreenA(

  class User{
    String name;
  1. Recieve object/model/bloc/ by calling Provider.of<ObjectType>(context)
class ScreenC extends StatelessWidget {
  Widget build(BuildContext context) {
    User user = Provider.of<User>(context);
    print(; //erluxman
    return Container(
      child: Center(
        child: Text(, //erluxman

visit provider

#Day87 Flutter Sinppets

Using Flutter snippets helps gain speed and become productive by eliminating the time typing the boilerplate code by autocompleting various snippets.

for android studio

for vscode


#Day88 Create Emoji FloatingActionButton

When we get too used to using Icon in FloatingActionButton, we tend to forget that we can use various types of widget as FloatingActionButton’s child.

We can use emoji Text as Child to FloatingActionButton to get wonderful colorful Fabs without any image.

  backgroundColor: Colors.white,
  child: Text(
    style: TextStyle(fontSize: 30),),

try in codepen


#Day89 Run any task in a periodic interval with Timer.periodic()

You can run any task repeatedly in a certain time period like this:

Timer.periodic(const Duration(seconds: 1), (Timer time) {
    setState(() {
        // Your code that runs periodically
        secondsPast += 1;

try on codepen


#Day90 Launcher Icon with ease

Don’t want to create launcher Icons for platform and put them in place manually?

use flutter_launcher_icons

  1. Add dev dependency (remember dev_dependencies).
  flutter_launcher_icons: ^0.7.5
  1. Configure fluttericons (**`no spaces before fluttericons:`**)
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/ic_launcher.png" #use your image path
  1. Generate Icons
flutter pub run flutter_launcher_icons:main
  1. Run app
Android icon iOS icon

visit flutterlaunchericons

#91 dough package

Want to make Flutter widgets smooshy like Jelly or Dough? Use the package dough

  1. Add dough to dependency

    dough: ^version
  2. Wrap any widget with PressableDough().
  child: FloatingActionButton(
    onPressed: () {},
    child: Text("🧠",style: TextStyle(fontSize: 40)),
  1. Sorry to disappoint but you are already done 😜

sample gist

visit dough