This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
void main() { | |
test('should round 0.145 to 0.15', () { | |
const value = 0.145; | |
final rounded = value.toStringAsFixed(2); | |
expect(rounded, '0.15'); // actual 0.14 | |
}); | |
test('should round 0.145 to 0.15', () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final Map<String, dynamic> json = { | |
"adult": false, | |
"backdrop_path": '/8Y43POKjjKDGI9MH89NW0NAzzp8.jpg', | |
"genre_ids": [28, 12, 14, 878], | |
"id": 140607, | |
"release_date": '2015-12-18', | |
}; | |
final { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const double boxSize = 65; | |
class CubeAnimation extends StatefulWidget { | |
const CubeAnimation(); | |
@override | |
_CubeAnimationState createState() => _CubeAnimationState(); | |
} |