The app to demo animation with Flutter by implement Facebook reactions

Overview
You might also like...

An app which has only UI of a multimedia app. Designed with Flutter.

An app which has only UI of a multimedia app. Designed with Flutter.

multimedia_app ---ScreenShots--- | | | | Getting Started This project is a starting point for a Flutter application. A few resources to get you starte

Jul 14, 2022

Movies App UI in Flutter using Simple Widgets without Using API's in Flutter.

Movies App UI in Flutter using Simple Widgets without Using API's in Flutter.

Movies App UI in Flutter using Simple Widgets without Using API's in Flutter.

May 15, 2022

Flutter Complete E-Commerce app (UI by - 'The Flutter Way')

NOT COMPLETED YET! e_commerce A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Mar 8, 2022

Flutter Shop UI - an e-commerce app using Flutter

Flutter Shop UI - an e-commerce app using Flutter

If you are planning to create an e-commerce app using Flutter then this Shop UI Kit would be the perfect choice for you to make a gorgeous app for both Android & iOS.

Nov 21, 2022

A flutter package to help you beautify your app popups.

A flutter package to help you beautify your app popups.

flutter_beautiful_popup 中文 A flutter package to help you beautify your app popup, can be used in all platform.Live Demo. Preview: Getting Started Add

Dec 30, 2022

Nice and clean Online Shop app UI by using #Flutter.

Nice and clean Online Shop app UI by using #Flutter.

On our E-commerce app UI has two pages one for the product page which has a horizontal list of categories then a list of our products. Then on the details page, it shows the price and short description of the product with the Buy Now button. The best part of our E-commerce app is, each product has its own color which looks great.

Jan 3, 2023

A simple number ticker for flutter app.

A simple number ticker for flutter app.

Number Ticker Number_ticker is a dart package that provides a Robinhood-like number ticker widget for displaying changing number. Usage import 'packag

Jun 18, 2022

Attempt to learn flutter and clone my favourite Google Keep App.

Note App Flutter Attempt to learn flutter and clone my favourite Google Keep App. Getting Started This project is a starting point for a Flutter appli

Oct 31, 2022

An app built using Flutter that holds buttons in form of xylophone which plays as instrument when clicked.

xylophone_flutter A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

Feb 3, 2022
Comments
  • Reactions don't appear when embedded inside a ListView builder

    Reactions don't appear when embedded inside a ListView builder

    First I'd like to thank you for this useful tutorial , I followed your code to implement the reactions button , then put it inside a ListView builder so that every row of the list have a text and a react like button . The problem is that when I click on the button , the reactions either don't display or when they do i can't click on them to change the reaction . I cloned your code and tried the button inside an empty project without the ListView builder , it works fine.

    This is my code :

    Expanded(
                        flex : 8,
                        child: SizedBox(
                          height: 600.0,
                          child: ListView.builder(
    
                              itemCount:
                                  2,
                              itemBuilder: (BuildContext context, int index) {
    
                                return Card(
                                  child: Center(
                                    child: Container(
                                      height: 110,
                                      child: Row(
    
    
                                        children: <Widget>[
    
    
                                          Expanded(
    
                                              child: Text(
                                                  'mission'),
    
    
                                          ),
                                          SizedBox(height: 30),
                                          Expanded(
                                            child: btnLike()
    
                                          )
    
    
                                        ],
                                      ),
                                    ),
                                  ),
                                );
                              }),
                        ),
                      ),
    
    
    
    
    
    
    
    

    btnLike() widget :

    
    Widget btnLike(){
        return GestureDetector(
          child: Padding(
            padding: const EdgeInsets.all(20.0),
            child:Column(
              children: <Widget>[
                // Just a top space
    
                // main content
                Expanded(
                  child: Container(
                    child: Expanded(
                      child: Stack(
                        children: <Widget>[
                          // Box and icons
                          Stack(
                            children: <Widget>[
                              // Box
                              renderBox(),
    
                              // Icons
                              renderIcons(),
                            ],
                            alignment: Alignment.bottomLeft,
                          ),
    
                          // Button like
                          renderBtnLike(),
    
                          // Icons when jump
                          // Icon like
                          whichIconUserChoose == 1 && !isDragging
                              ? Container(
                            child: Transform.scale(
                              child: Image.asset(
                                "images/close.png",
                                width: 20.0,
                                height: 20.0,
                              ),
                              scale: this.zoomIconWhenRelease.value,
                            ),
                            margin: EdgeInsets.only(
                              top: processTopPosition(this.moveUpIconWhenRelease.value),
                              left: this.moveLeftIconLikeWhenRelease.value,
                            ),
                          )
                              : Container(),
    
                          // Icon love
                          whichIconUserChoose == 2 && !isDragging
                              ? Container(
                            child: Transform.scale(
                              child: Image.asset(
                                "images/nowork.png",
                                width: 20.0,
                                height: 20.0,
                              ),
                              scale: this.zoomIconWhenRelease.value,
                            ),
                            margin: EdgeInsets.only(
                              top: processTopPosition(this.moveUpIconWhenRelease.value),
                              left: this.moveLeftIconLoveWhenRelease.value,
                            ),
                          )
                              : Container(),
    
                          // Icon haha
                          whichIconUserChoose == 3 && !isDragging
                              ? Container(
                            child: Transform.scale(
                              child: Image.asset(
                                "images/sunny.png",
                                width: 20.0,
                                height: 20.0,
                              ),
                              scale: this.zoomIconWhenRelease.value,
                            ),
                            margin: EdgeInsets.only(
                              top: processTopPosition(this.moveUpIconWhenRelease.value),
                              left: this.moveLeftIconHahaWhenRelease.value,
                            ),
                          )
                              : Container(),
    
    
                        ],
                      ),
                    ),
                    margin: EdgeInsets.only(left: 20.0, right: 20.0),
                    // Area of the content can drag
                    // decoration:  BoxDecoration(border: Border.all(color: Colors.grey)),
                    width: double.infinity,
    
                  ),
                ),
              ],
            ),
    
          ),
    
          onHorizontalDragEnd: onHorizontalDragEndBoxIcon,
          onHorizontalDragUpdate: onHorizontalDragUpdateBoxIcon,
        );
    
      }
    
    
    
    

    Widget renderIcons()

    
    Widget renderIcons() {
        return Container(
          child: Row(
            children: <Widget>[
              // icon like
              Transform.scale(
                child: Container(
                  child: Column(
                    children: <Widget>[
                      currentIconFocus == 1
                          ? Container(
                        child: Text(
                          'Now work',
                          style: TextStyle(fontSize: 8.0, color: Colors.white),
                        ),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(10.0),
                          color: Colors.black.withOpacity(0.3),
                        ),
                        padding: EdgeInsets.only(left: 7.0, right: 7.0, top: 2.0, bottom: 2.0),
                        margin: EdgeInsets.only(bottom: 8.0),
                      )
                          : Container(),
                      Expanded(
                        child: Image.asset(
                          "assets/icons/close.png",
                          width: 20.0,
                          height: 20.0,
                          fit: BoxFit.contain,
                        ),
                      ),
                    ],
                  ),
                  margin: EdgeInsets.only(bottom: pushIconLikeUp.value),
                  width: 60.0,
                  height: currentIconFocus == 1 ? 70.0 : 60.0,
                ),
                scale: isDragging
                    ? (currentIconFocus == 1
                    ? this.zoomIconChosen.value
                    : (previousIconFocus == 1
                    ? this.zoomIconNotChosen.value
                    : isJustDragInside
                    ? this.zoomIconWhenDragInside.value
                    : 0.8))
                    : isDraggingOutside
                    ? this.zoomIconWhenDragOutside.value
                    : this.zoomIconLike.value,
              ),
              Transform.scale(
             child: Container(
               child: Column(
                 children: <Widget>[
                   currentIconFocus == 2
                       ? Container(
                     child: Text(
                       'Day Off',
                       style: TextStyle(fontSize: 8.0, color: Colors.white),
                     ),
                     decoration: BoxDecoration(
                         borderRadius: BorderRadius.circular(10.0), color: Colors.black.withOpacity(0.3)),
                     padding: EdgeInsets.only(left: 7.0, right: 7.0, top: 2.0, bottom: 2.0),
                     margin: EdgeInsets.only(bottom: 8.0),
                   )
                       : Container(),
                   Expanded(
                     child
    
                         : Image.asset(
                       'assets/icons/nowork.png',
                       width: 20.0,
                       height: 20.0,
                       fit: BoxFit.contain,
                     ),
                   ),
                 ],
               ),
               margin: EdgeInsets.only(bottom: pushIconLoveUp.value),
               width: 60.0,
               height: currentIconFocus == 2 ? 70.0 : 60.0,
             ),
             scale: isDragging
                 ? (currentIconFocus == 2
                 ? this.zoomIconChosen.value
                 : (previousIconFocus == 2
                 ? this.zoomIconNotChosen.value
                 : isJustDragInside
                 ? this.zoomIconWhenDragInside.value
                 : 0.8))
                 : isDraggingOutside
                 ? this.zoomIconWhenDragOutside.value
                 : this.zoomIconLove.value,
           ),
              Transform.scale(
                child: Container(
                  child: Column(
                    children: <Widget>[
                      currentIconFocus == 3
                          ? Container(
                        child: Text(
                          'Full Day',
                          style: TextStyle(fontSize: 8.0, color: Colors.white),
                        ),
                        decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(10.0), color: Colors.black.withOpacity(0.3)),
                        padding: EdgeInsets.only(left: 7.0, right: 7.0, top: 2.0, bottom: 2.0),
                        margin: EdgeInsets.only(bottom: 8.0),
                      )
                          : Container(),
                      Expanded(
                        child: Image.asset(
                          'assets/icons/sunny.png',
                          width: 20.0,
                          height: 20.0,
                          fit: BoxFit.contain,
                        ),
                      ),
                    ],
                  ),
                  margin: EdgeInsets.only(bottom: pushIconHahaUp.value),
                  width: 60.0,
                  height: currentIconFocus == 3 ? 70.0 : 60.0,
                ),
                scale: isDragging
                    ? (currentIconFocus == 3
                    ? this.zoomIconChosen.value
                    : (previousIconFocus == 3
                    ? this.zoomIconNotChosen.value
                    : isJustDragInside
                    ? this.zoomIconWhenDragInside.value
                    : 0.8))
                    : isDraggingOutside
                    ? this.zoomIconWhenDragOutside.value
                    : this.zoomIconHaha.value,
              ),
              Transform.scale(
                child: Container(
                  child: Column(
                    children: <Widget>[
                      currentIconFocus == 4
                          ? Container(
                        child: Text(
                          'Half Day',
                          style: TextStyle(fontSize: 8.0, color: Colors.white),
                        ),
                        decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(10.0), color: Colors.black.withOpacity(0.3)),
                        padding: EdgeInsets.only(left: 7.0, right: 7.0, top: 2.0, bottom: 2.0),
                        margin: EdgeInsets.only(bottom: 8.0),
                      )
                          : Container(),
                      Expanded(
                        child: Image.asset(
                          'assets/icons/sunrise.png',
                          width: 20.0,
                          height: 20.0,
                          fit: BoxFit.contain,
                        ),
                      ),
                    ],
                  ),
                  margin: EdgeInsets.only(bottom: pushIconWowUp.value),
                  width: 30.0,
                  height: currentIconFocus == 4 ? 70.0 : 60.0,
                ),
                scale: isDragging
                    ? (currentIconFocus == 4
                    ? this.zoomIconChosen.value
                    : (previousIconFocus == 4
                    ? this.zoomIconNotChosen.value
                    : isJustDragInside
                    ? this.zoomIconWhenDragInside.value
                    : 0.8))
                    : isDraggingOutside
                    ? this.zoomIconWhenDragOutside.value
                    : this.zoomIconWow.value,
              ),
              // icon love,
    
    
              // icon haha
    
    
              // icon wow
    
    
    
            ],
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            crossAxisAlignment: CrossAxisAlignment.center,
          ),
          width: 300.0,
          height: 250.0,
          margin: EdgeInsets.only(left: this.moveRightGroupIcon.value, top: 150.0),
          // uncomment here to see area of draggable
          // color: Colors.amber.withOpacity(0.5),
        );
      }
    
    
    
    
    
    
    
    

    Widget renderBtnLike()

    Widget renderBtnLike() {
        return Container(
          child: GestureDetector(
            onTapDown: onTapDownBtn,
            onTapUp: onTapUpBtn,
            onTap: onTapBtn,
            child: Container(
              child: Row(
                children: <Widget>[
                  // Icon like
                  Expanded(
                    child: Transform.scale(
                      child: Transform.rotate(
                        child: Image.asset(
                          getImageIconBtn(),
                          width: 10.0,
                          height: 10.0,
                          fit: BoxFit.contain,
                          color: getTintColorIconBtn(),
                        ),
                        angle:
                        !isLongPress ? handleOutputRangeTiltIconLike(tiltIconLikeInBtn2.value) : tiltIconLikeInBtn.value,
                      ),
                      scale:
                      !isLongPress ? handleOutputRangeZoomInIconLike(zoomIconLikeInBtn2.value) : zoomIconLikeInBtn.value,
                    ),
                  ),
    
                  // Text like
                  Expanded(
                    child: Transform.scale(
                      child: Text(
                        getTextBtn(),
                        style: TextStyle(
                          color: getColorTextBtn(),
                          fontSize: 8.0,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      scale:
                      !isLongPress ? handleOutputRangeZoomInIconLike(zoomIconLikeInBtn2.value) : zoomTextLikeInBtn.value,
                    ),
                  ),
                ],
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              ),
              padding: EdgeInsets.all(8.0),
              color: Colors.transparent,
            ),
          ),
          width: 100.0,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(4.0),
            color: Colors.white,
            border: Border.all(color: getColorBorderBtn()),
          ),
          margin: EdgeInsets.all(20.0),
        );
      }
    
    
    
    
    
    
    
    

    Working on a very important project and been stuck for a while now I would appreciate a little help . Also one more thing when I click on one button inside the ListView builder all buttons get triggered, I want to be able to only change the reactions of the clicked button , thank you in advance .

    opened by talbiislam96 0
Owner
Duy Tran
Duy Tran
A Flutter project that gives basic flutter design to implement a login UI

Login UI Design A Flutter project that gives basic flutter design to implement a

CABREX 9 Nov 8, 2022
Responsive Sizer helps implement are responsive layout by providing helper widgets and extensions

Responsive Sizer Responsive Sizer helps implement a responsive layout by providing helper widgets and extensions Content Installation Parameters Take

CoderUni 71 Jan 3, 2023
Demo UI of e-commerce app made with Flutter.

Flutter Ecommerce App UI Demo A sample application to show an Ecommerce App Flutter Clone. Demo Android Screen iOS Screen Getting Started This project

FlutterDevs 345 Jan 5, 2023
Flutter Animation - Grocery App UI

Flutter Animation - Grocery App UI Packages we are using: flutter_svg: link goole_fonts: link Fonts Poppins link creating a custom animation Grocery A

null 1 Feb 14, 2022
A Flutter package consisting of pre animated cards(containers) with fluid animation for freely adding user customized cards to the app with heavy customizable options adding up to an incredible UI experience

A Flutter package consisting of pre animated cards(containers) with fluid animation for freely adding user customized cards to the app with heavy customizable options adding up to an incredible UI experience

Shantanu 12 Dec 30, 2022
Flutter Beautiful Login Page design and Animation - day 12

Flutter Beautiful Login Page design and Animation - day 12

Mohammad Rahmani 296 Jan 1, 2023
A flutter package that contains a collection of icon decoration tools (i.e. gradient, opacity) and icon transition features with cool animation effects.

Advanced Icon A flutter package that contains a collection of icon decoration tools (i.e. gradient, opacity) and icon transition features with cool an

Ankit Mishra 8 Dec 24, 2021
A customizable timer builder, with controller, animation, intervals, callbacks and custom actions for Flutter.

Custom Timer ⌛ A highly customizable timer builder, with controller, animation, intervals, callbacks, custom actions, and more! ?? Simple Usage @overr

Federico De Sía 27 Nov 23, 2022
A package for flip panel with built-in animation

Flip Panel A package for flip panel with built-in animation How to use import 'package:flip_panel/flip_panel.dart'; Create a flip panel from iterable

HungHD 554 Dec 30, 2022
Flutter-business-card-app - Flutter + Dart business card mobile app

Dart + Flutter Business Card Mobile Application

Mark Hellner 1 Nov 8, 2022