• Integer values no larger than 64 bits,depending on the platform.On the Dart VM, values can be from-263 to 263 - 1.Dart that’s compiled to JavaScript usesJavaScript numbers,allowing values from -253 to 253 - 1.

    • 64-bit (double-precision) floating-point numbers, as specified bythe IEEE 754 standard.

    Integers are numbers without a decimal point. Here are some examples ofdefining integer literals:

    If a number includes a decimal, it is a double. Here are some examplesof defining double literals:

    1. var y = 1.1;
    2. var exponents = 1.42e5;

    Version note: Before Dart 2.1, it was an error to use an integer literal in a double context.

    Here’s how you turn a string into a number, or vice versa:

    1. assert(one == 1);
    2. // String -> double
    3. var onePointOne = double.parse('1.1');
    4. assert(onePointOne == 1.1);
    5. // int -> String
    6. assert(oneAsString == '1');
    7. // double -> String
    8. String piAsString = 3.14159.toStringAsFixed(2);
    9. assert(piAsString == '3.14');

    Literal numbers are compile-time constants.Many arithmetic expressions are also compile-time constants,as long as their operands arecompile-time constants that evaluate to numbers.

    1. const msPerSecond = 1000;
    2. const secondsUntilRetry = 5;