File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ class _MainFetchDataState extends State<MainFetchData> {
17
17
setState (() {
18
18
isLoading = true ;
19
19
});
20
- final response =
21
- await http .get ("https://jsonplaceholder.typicode.com/photos" );
20
+ final response = await http
21
+ .get (Uri . parse ( "https://jsonplaceholder.typicode.com/photos" ) );
22
22
if (response.statusCode == 200 ) {
23
23
list = (json.decode (response.body) as List )
24
24
.map ((data) => new Photo .fromJson (data))
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ class _Page1State extends State<Page1> {
12
12
var list = List ();
13
13
14
14
_loadList () async {
15
- final response =
16
- await http .get ("https://jsonplaceholder.typicode.com/posts/" );
15
+ final response = await http
16
+ .get (Uri . parse ( "https://jsonplaceholder.typicode.com/posts/" ) );
17
17
if (response.statusCode == 200 ) {
18
18
await Future .delayed (const Duration (seconds: 1 ));
19
19
if (mounted) {
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class _Page2State extends State<Page2>
13
13
var list = List ();
14
14
15
15
_loadList () async {
16
- final response =
17
- await http .get ("https://jsonplaceholder.typicode.com/photos/" );
16
+ final response = await http
17
+ .get (Uri . parse ( "https://jsonplaceholder.typicode.com/photos/" ) );
18
18
if (response.statusCode == 200 ) {
19
19
await Future .delayed (const Duration (seconds: 1 ));
20
20
if (mounted) {
You can’t perform that action at this time.
0 commit comments