Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/fetch_data/main_fetch_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class _MainFetchDataState extends State<MainFetchData> {
setState(() {
isLoading = true;
});
final response =
await http.get("https://jsonplaceholder.typicode.com/photos");
final response = await http
.get(Uri.parse("https://jsonplaceholder.typicode.com/photos"));
if (response.statusCode == 200) {
list = (json.decode(response.body) as List)
.map((data) => new Photo.fromJson(data))
Expand Down
4 changes: 2 additions & 2 deletions lib/persistent_tabbar/page1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class _Page1State extends State<Page1> {
var list = List();

_loadList() async {
final response =
await http.get("https://jsonplaceholder.typicode.com/posts/");
final response = await http
.get(Uri.parse("https://jsonplaceholder.typicode.com/posts/"));
if (response.statusCode == 200) {
await Future.delayed(const Duration(seconds: 1));
if (mounted) {
Expand Down
4 changes: 2 additions & 2 deletions lib/persistent_tabbar/page2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class _Page2State extends State<Page2>
var list = List();

_loadList() async {
final response =
await http.get("https://jsonplaceholder.typicode.com/photos/");
final response = await http
.get(Uri.parse("https://jsonplaceholder.typicode.com/photos/"));
if (response.statusCode == 200) {
await Future.delayed(const Duration(seconds: 1));
if (mounted) {
Expand Down