Answers for "round edge in flutter"

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 off double in flutter

import 'dart:math';

double roundDouble(double val, int places){
  num mod = pow(10.0, places);
  return ((val * mod).round().toDouble() / mod);
}
Posted by: Guest on December-15-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language