Showing
1 changed file
with
18 additions
and
18 deletions
| @@ -18,18 +18,18 @@ void main() { | @@ -18,18 +18,18 @@ void main() { | ||
| 18 | child: Text("increment"), | 18 | child: Text("increment"), |
| 19 | onPressed: () => controller.increment(), | 19 | onPressed: () => controller.increment(), |
| 20 | ), | 20 | ), |
| 21 | - FlatButton( | ||
| 22 | - child: Text("incrementWithId"), | ||
| 23 | - onPressed: () => controller.incrementWithId(), | ||
| 24 | - ), | ||
| 25 | - GetBuilder<Controller>( | ||
| 26 | - id: '1', | ||
| 27 | - didChangeDependencies: (_) { | ||
| 28 | - print("didChangeDependencies called"); | ||
| 29 | - }, | ||
| 30 | - builder: (controller) { | ||
| 31 | - return Text('id ${controller.counter}'); | ||
| 32 | - }), | 21 | + // FlatButton( |
| 22 | + // child: Text("incrementWithId"), | ||
| 23 | + // onPressed: () => controller.incrementWithId(), | ||
| 24 | + // ), | ||
| 25 | + // GetBuilder<Controller>( | ||
| 26 | + // id: '1', | ||
| 27 | + // didChangeDependencies: (_) { | ||
| 28 | + // print("didChangeDependencies called"); | ||
| 29 | + // }, | ||
| 30 | + // builder: (controller) { | ||
| 31 | + // return Text('id ${controller.counter}'); | ||
| 32 | + // }), | ||
| 33 | GetBuilder<Controller2>(builder: (controller) { | 33 | GetBuilder<Controller2>(builder: (controller) { |
| 34 | return Text('lazy ${controller.test}'); | 34 | return Text('lazy ${controller.test}'); |
| 35 | }), | 35 | }), |
| @@ -59,11 +59,11 @@ void main() { | @@ -59,11 +59,11 @@ void main() { | ||
| 59 | 59 | ||
| 60 | expect(find.text("2"), findsOneWidget); | 60 | expect(find.text("2"), findsOneWidget); |
| 61 | 61 | ||
| 62 | - await test.tap(find.text('incrementWithId')); | 62 | + // await test.tap(find.text('incrementWithId')); |
| 63 | 63 | ||
| 64 | await test.pump(); | 64 | await test.pump(); |
| 65 | 65 | ||
| 66 | - expect(find.text("id 3"), findsOneWidget); | 66 | + // expect(find.text("id 3"), findsOneWidget); |
| 67 | expect(find.text("lazy 0"), findsOneWidget); | 67 | expect(find.text("lazy 0"), findsOneWidget); |
| 68 | expect(find.text("single 0"), findsOneWidget); | 68 | expect(find.text("single 0"), findsOneWidget); |
| 69 | }); | 69 | }); |
| @@ -90,10 +90,10 @@ class Controller extends GetController { | @@ -90,10 +90,10 @@ class Controller extends GetController { | ||
| 90 | update(); | 90 | update(); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | - void incrementWithId() { | ||
| 94 | - counter++; | ||
| 95 | - update(this, ['1']); | ||
| 96 | - } | 93 | + // void incrementWithId() { |
| 94 | + // counter++; | ||
| 95 | + // update(this, ['1']); | ||
| 96 | + // } | ||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | class Controller2 extends GetController { | 99 | class Controller2 extends GetController { |
-
Please register or login to post a comment