Answers for "flutter round"

3

double variable into 2 decimal places flutter

double num1 = double.parse((12.3412).toStringAsFixed(2));
// 12.34

double num2 = double.parse((12.5668).toStringAsFixed(2));
// 12.57

double num3 = double.parse((-12.3412).toStringAsFixed(2));
// -12.34

double num4 = double.parse((-12.3456).toStringAsFixed(2));
// -12.35
Posted by: Guest on November-29-2020
2

flutter round container

QUESTION: Flutter give container rounded border

ANSWER1: 

Container(
    decoration: BoxDecoration(
    shape: BoxShape.circle,
    ),
    child:   ...
    ),

ANSWER 2:
Container(
  decoration: BoxDecoration(
    border: Border.all(
      color: Colors.red[500],
    ),
    borderRadius: BorderRadius.all(Radius.circular(20))
  ),
  child: ...
)
Posted by: Guest on August-18-2020
0

round container flutter

Container(
      width: screenWidth / 7,
      decoration: BoxDecoration(
        border: Border.all(
          color: Colors.red[500],
        ),
      ),
      child: Padding(
        padding: EdgeInsets.all(5.0),
        child: Column(
          children: <Widget>[
            Text(
              '6',
              style: TextStyle(
                  color: Colors.red[500],
                  fontSize: 25),
            ),
            Text(
             'sep',
              style: TextStyle(
                  color: Colors.red[500]),
            )
          ],
        ),
      ),
    );
Posted by: Guest on November-08-2020

Browse Popular Code Answers by Language