BrunoJurkovic / flip_card

A Flutter widget that easily adds the flipping animation to any widget
BSD 3-Clause "New" or "Revised" License
345 stars 103 forks source link

[BUG] can we change height or width on back side? #88

Open RanaSharjeelShji opened 11 months ago

RanaSharjeelShji commented 11 months ago

it set front side height and width to back side design automatically

[FlipCard(
                            fill: Fill.fillBack,
                            direction: FlipDirection.HORIZONTAL,
                            side: CardSide.FRONT,
                            front: Container(
                              height: 200, // Set the height for the front side
                              width: 300, // Set the width for the front side
                              child: Row(
                                crossAxisAlignment: CrossAxisAlignment.center,
                                mainAxisAlignment: MainAxisAlignment.start,
                                children: [
                                  ClipRRect(
                                    borderRadius: BorderRadius.circular(h * .5),
                                    child: Image.network(
                                      appointments[index]['docImage']
                                          .toString(),
                                      fit: BoxFit.cover,
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.all(8.0),
                                    child: Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      mainAxisAlignment:
                                          MainAxisAlignment.center,
                                      children: [
                                        Text(
                                          appointments[index]['title']
                                              .toString(),
                                          style: AppConstants.titleTextStyle,
                                        ),
                                        Text(
                                          appointments[index]['title']
                                              .toString(),
                                          style: AppConstants
                                              .subtitleDarkTextStyle,
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                            ),
                            back: Container(
                              height:
                                  400, // Set a different height for the back side
                              width:
                                  350, // Set a different width for the back side
                              color: AppConstants.primaryColor,
                              child: Center(
                                child: Text(
                                  appointments[index]['docName'].toString(),
                                ),
                              ),
                            ),
                          ),](url)