Skip to content

Commit 436a29b

Browse files
committed
fix: error in riverpod
1 parent e8837eb commit 436a29b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ios/Runner/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

lib/riverpod/number_trivia_provider.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class NumberTrivia extends _$NumberTrivia {
2525

2626
try {
2727
final response = await Isolate.run(() async {
28-
await http.get(
28+
return await http.get(
2929
Uri.parse('$API_URL/random'),
3030
headers: {
3131
'Content-Type': 'application/json',
@@ -59,7 +59,7 @@ class NumberTrivia extends _$NumberTrivia {
5959
state = const AsyncLoading();
6060

6161
final response = await Isolate.run(() async {
62-
await http.get(
62+
return await http.get(
6363
Uri.parse('$API_URL/$number'),
6464
headers: {
6565
'Content-Type': 'application/json',

lib/riverpod/number_trivia_provider.g.dart

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)