Skip to content

Commit

Permalink
Merge pull request #10 from akiransa/patch-1
Browse files Browse the repository at this point in the history
Update Table.dart
  • Loading branch information
AseemWangoo authored Jul 22, 2021
2 parents 948a0fa + 00e1d43 commit 8da7e60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class UserOptionsState extends State<UserOptions> {
future: loadData(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return body(snapshot.data);
return body(snapshot.data as Map<String, dynamic>);
} else {
return Center(
child: CircularProgressIndicator(),
Expand Down Expand Up @@ -126,7 +126,7 @@ class UserOptionsState extends State<UserOptions> {

Future<Map> loadData() async {
http.Response response = await http.get(
Uri.encodeFull("http://dummy.restapiexample.com/api/v1/employee/52"),
Uri.parse("http://dummy.restapiexample.com/api/v1/employee/52"),
headers: {"Accept": "application/json"});
Map data = jsonDecode(response.body);
return data;
Expand Down

0 comments on commit 8da7e60

Please sign in to comment.