Skip to content

Commit

Permalink
Healthcenter Null Safety Added
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatgondane committed Jan 13, 2022
1 parent 651bd2e commit e9b72e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Empty file added adb
Empty file.
10 changes: 5 additions & 5 deletions lib/screens/Healthcenter/healthcentermodule.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class HealthCenterMod extends StatefulWidget {

class _HealthCenterModState extends State<HealthCenterMod> {
bool _loading1 = true;
late StreamController _healthController;
late HeathService healthService;
late HealthData data;
StreamController? _healthController;
HeathService? healthService;
HealthData? data;
String? name;
String? depttype;
@override
Expand All @@ -42,7 +42,7 @@ class _HealthCenterModState extends State<HealthCenterMod> {

getData() async {
//print('token-'+widget.token!);
Response response = await healthService.getHealth(widget.token!);
Response response = await healthService!.getHealth(widget.token!);
setState(() {
print(response);
data = HealthData.fromJson(jsonDecode(response.body));
Expand All @@ -52,7 +52,7 @@ class _HealthCenterModState extends State<HealthCenterMod> {

loadData() async {
getData().then((res) {
_healthController.add(res);
_healthController!.add(res);
});
}
BoxDecoration myBoxDecoration() {
Expand Down

0 comments on commit e9b72e5

Please sign in to comment.