Row Map Click With Opacity In Flutter

Row Map Click With Opacity In Flutter :

Row Map Click With Opacity In Flutter

Row Map Click With Opacity.dart

 final List<TaxiType> taxiTypes = [
    TaxiType.Standard,
    TaxiType.Premium,
    TaxiType.Platinum
  ];

TaxiType selectedTaxiType;

Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: taxiTypes.map((val) => GestureDetector(
                onTap: () {
                  setState(() {
                    selectedTaxiType = val;
                  });
                },
                child: Opacity(
                  opacity: val == selectedTaxiType ? 1.0 : 0.5,
                  child: Padding(
                    padding: const EdgeInsets.all(12.0),
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      children: <Widget>[
                        ClipRRect(
                          borderRadius: BorderRadius.circular(16.0),
                          child: Image.asset(
                            "images/taxi.jpg",
                            height: MediaQuery.of(context).size.width / 6,
                            width: MediaQuery.of(context).size.width / 6,
                            fit: BoxFit.cover,
                          ),
                        ),
                        SizedBox(
                          height: 12.0,
                        ),
                        Text(
                          val.toString().replaceFirst("TaxiType.", ""),
                          style: Theme.of(context).textTheme.title,
                        ),
                      ],
                    ),
                  ),
                ),
              ))
          .toList(),
    )

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in