 This tutorial shows how to to convert radian to degree and vice versa in Dart which also works in Flutter.

Below is the equation for conversion between those two measurement units.

``360°=2π radians``

which can be written as

``1° = π/180°``

Even though Dart doesn't provide the methods for converting between radian and degree out of the box, there are packages providing methods for that purpose if you don't want to create your own method.

## Converting Radian to Degree & Vice Versa Using `vector_math`

`vector_math` is a library from Google Developers that provides the functionality to do the conversions.

First, you need to add the following dependency to the `dependencies` section of your `pubspec.yaml`.

``````  dependencies:
vector_math: any``````

Then you need to import the library on the file you want to invoke the methods.

``  import 'package:vector_math/vector_math.dart'``

For converting radian to degree, use `degrees` method.

``````  degrees(0); // 0.0
degrees(1); // 57.29577951308232``````

For converting degree to radian, use `radians` method.
``````  radians(0); // 0.0