From 5e3537e8128145ab3a47f953c536b2424fe44ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Tu=C5=A1ar?= Date: Sun, 9 Jun 2024 10:28:18 +0100 Subject: [PATCH] refactor: extract ArticlesService out of the caller method --- examples/alice_chopper/lib/main.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/alice_chopper/lib/main.dart b/examples/alice_chopper/lib/main.dart index 8ad94560..177aa861 100644 --- a/examples/alice_chopper/lib/main.dart +++ b/examples/alice_chopper/lib/main.dart @@ -17,6 +17,7 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { final AliceChopperAdapter _aliceChopperAdapter = AliceChopperAdapter(); + late final Alice _alice = Alice( showNotification: true, showInspectorOnShake: true, @@ -40,10 +41,10 @@ class _MyAppState extends State { converter: converter, ); - Future _runChopperHttpRequests() async { - final ArticlesService articlesService = - _chopper.getService(); + late final ArticlesService articlesService = + _chopper.getService(); + Future _runChopperHttpRequests() async { final Article article = Article( title: 'foo', body: 'bar',