dart run main.dart dart create xspring-app
- bin - lib - test - pubspec.yaml - pubspec.lock
Calculator
plus
as
class Calculator { final _a; final _b; Calculator(this._a, this._b); int plus() { return _a + _b; } }
class SuperCalculator extends Calculator { SuperCalculator(int a, int b) : super(a, b); @override int plus() { return super.plus() + 1; } }
Future<int> plusAsync() async { return _a + _b; } test('plusAsync', () async { int a = 1; int b = 2; Calculator cal = Calculator(a, b); expect(await cal.plusAsync(), 3); });
?
!
Get.arguments
Get.Put
Get.find
Get.toNamed