The app to demo animation with Flutter by implement Facebook reactions

Overview
You might also like...

Create account, animation transition and animation painter logo splash

Create account, animation transition and animation painter logo splash

flutter_text_form_field This project have a splash screen by using animation and creating profile. Login and Register. Page transition animation App S

May 2, 2021

Animation Examples: stepper Counter loading Ripple Circle Generator water Flow Animation Wave

AnimatioExamples(stepperCounter-loadingRippleCircleGenerator-waterFlowAnimationWave) A new Flutter project. Getting Started This project is a starting

Nov 1, 2022

A Flutter app to show how to implement in-app purchase using the in-app-purchase package

Flutter in-app purchase A Flutter project to show to implement in-app purchase using the in_app_purchase package Simple UI but it's okay 🥲 😉 WhatsAp

Jul 26, 2022

A flutter plugin to add login with facebook in your flutter app

A flutter plugin to add login with facebook in your flutter app

Features Login on iOS, Android and Web. Express login on Android. Granted and declined permissions. User information, picture profile and more. Provid

Jan 6, 2023

Flutter Plugin for Facebook App Events

facebook_app_events Flutter plugin for Facebook App Events. An app event is an action that takes place in your app or on your web page such as a perso

Jan 3, 2023

how to Integrating facebook audience network to flutter app for banner, interstitial, rewarded, native and native banner

fb_ads_flutter_12 A new Flutter project. Getting Started Watch the complite tutorial for integrating Facebook ads into the Flutter app in our Youtube

Nov 26, 2022

Creating complete social media app like instagram, facebook using flutter dart.

instoo The social media application that allows user to check out new feed, like, comment and even check other user’s profile. It has search, follow,

Dec 1, 2022

An app that opens Facebook, Google, Youtube by Click on the navigation bar items specifically for each.

navbutton A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Feb 3, 2022

dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Dec 8, 2021
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 plugin to get facebook deep links and log app events using the latest Facebook SDK to include support for iOS 14

Facebook Sdk For Flutter LinkedIn GitHub facebook_sdk_flutter allows you to fetch deep links, deferred deep links and log facebook app events. This wa

Saad Farhan 23 Dec 17, 2022
Facebook-redesign - An app developed that show a Facebook inspired UI design

Superbe Lecteur de Musique fait avec Flutter ! Captures d'Écran Construire depui

Youssef Marzouk 4 Jul 7, 2022
Flutter + Firebase Auth Demo App that uses Google, Facebook, Email/Password Signup/Login, Email Verification and more!

Flutter Firebase Auth Demo Flutter + Firebase Auth Demo App that uses Google, Facebook, Email/Password Signup/Login, Email Verification and more! Feat

Rivaan Ranawat 55 Jan 7, 2023
Demo project to implement MVU architecture in a Flutter application

flutter_mvu A playground project for implementing MVU in Flutter CICD Automated

Kevin Strathdee 0 Dec 16, 2021
Flutter Facebook Redesign Application Design and Animation - day 19

Flutter Facebook Redesign Application A part of #flutter100daysofcode. Let's create a beautiful and animated Facebook Application UI with Flutter. Wat

Mohammad Rahmani 173 Dec 28, 2022
Web3-demo-flutter - A demo for the flutter web3 library.

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

Tommaso Azzalin 0 Oct 7, 2022
We created Flappy Bird, a straightforward game based on flutter animation, from scratch using only Dart & Flutter and no third-party games or animation components.

Flappy-Bird Description A ridiculous game created by Flutter, all you have to do is touch the screen to make the bird leap as long as you avoid the ba

hab 15 Dec 25, 2022
Card Swipe Animation Ruchika GuptaCard Swipe Animation [404⭐] - Swipe cards template by Ruchika Gupta.

FlutterCardSwipe Card Swipe Animation Creating the swipe view as used in the Tinder. Swipe right is considered accepted and swipe left is rejected.It

Ruchika Gupta 517 Dec 27, 2022
A Fluter tabview that text color can change with animation and bg color change with animation

float_tab A Fluter tabview that text color can change with animation and bg color change with animation Getting Started This project is a starting poi

ventureli 1 Dec 8, 2021
OnBoarding Animation provides page like animation to the onBoarding screens with the page indicator

OnBoarding Animation OnBoarding Animation provides page like animation to the onBoarding screens with the page indicator. Screenshots and Screen recor

null 13 Oct 12, 2022