Skip to content

Commit

Permalink
refactor: examples/alice_chopper (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored Jun 22, 2024
1 parent fcdf6ba commit c41aa79
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions examples/alice_chopper/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class _MyAppState extends State<MyApp> {
showNotification: true,
showInspectorOnShake: true,
maxCallsCount: 1000,
)
..addAdapter(_aliceChopperAdapter);
)..addAdapter(_aliceChopperAdapter);

late final ChopperClient _chopper = ChopperClient(
baseUrl: Uri.https('jsonplaceholder.typicode.com'),
Expand Down Expand Up @@ -71,14 +70,14 @@ class _MyAppState extends State<MyApp> {

late final AlbumsService albumsService = _chopper.getService<AlbumsService>();
late final ArticlesService articlesService =
_chopper.getService<ArticlesService>();
_chopper.getService<ArticlesService>();
late final CommentsService commentsService =
_chopper.getService<CommentsService>();
_chopper.getService<CommentsService>();
late final PhotosService photosService = _chopper.getService<PhotosService>();
late final TodosService todosService = _chopper.getService<TodosService>();
late final UsersService usersService = _chopper.getService<UsersService>();
late final BrokenArticlesService brokenArticlesService =
_chopper.getService<BrokenArticlesService>();
_chopper.getService<BrokenArticlesService>();

/// Albums HTTP requests
Future<void> _albumsRequests() async {
Expand Down Expand Up @@ -458,19 +457,22 @@ class _MyAppState extends State<MyApp> {
children: [
const SizedBox(height: 8),
const Text(
style: TextStyle(fontSize: 14),
'Welcome to example of Alice Http Inspector. '
'Click buttons below to generate sample data.',
'Click buttons below to generate sample data.',
),
ElevatedButton(
onPressed: _runChopperHttpRequests,
child: const Text(
'Run Chopper HTTP Requests',
),
),
const SizedBox(height: 8),
const Text(
style: TextStyle(fontSize: 14),
'After clicking on buttons above, you should receive notification.'
' Click on it to show inspector. '
'You can also shake your device or click button below.',
' Click on it to show inspector. '
'You can also shake your device or click button below.',
),
ElevatedButton(
onPressed: _runHttpInspector,
Expand Down

0 comments on commit c41aa79

Please sign in to comment.