I want the icon details
to point upward like as shown in the image. but the list of material icon has icon details
points to downward, so how can I rotate the material icon in my flutter project, without downloading the icon image.
Column( children: <Widget>[ Container( height: 48, decoration: BoxDecoration( color: Color(0xFFFBBC05), borderRadius: BorderRadius.circular(48), boxShadow: [ BoxShadow( blurRadius: 16, offset: Offset(0, 8), color: Color(0XFFFBBC05), spreadRadius: -10) ]), child: IconButton( icon: Icon( Icons.details, color: Colors.white, ), onPressed: null, ), ), SizedBox( height: 8, ), Text( "Historical", style: TextStyle(fontFamily: 'AirbnbCerealMedium', fontSize: 12), ), ], )
First make sure you have added Material Icon library. If this library is added just add the HTML css class rotate_right to any element to add the icon. Material Design Rotate Right Icon can be resized as per your need. You can manage size of icon(rotate_right) by using font-size css style.
You can wrap your IconButton
in a Transform
widget using the rotate constructor:
import 'dart:math' as math; Transform.rotate( angle: 180 * math.pi / 180, child: IconButton( icon: Icon( Icons.details, color: Colors.white, ), onPressed: null, ), ),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With