Skip to content

Commit

Permalink
Removed unnecessary toast notifications - final version
Browse files Browse the repository at this point in the history
  • Loading branch information
amitash-217 committed May 7, 2023
1 parent 67939f5 commit 006c87a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/ambulance_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ class AmbulanceFormState extends State<AmbulanceForm> {
print("Grid is to be drawn after submit!");
Grid grid = Grid();
grid.isBooking = true;
Fluttertoast.showToast(msg: "Something");
Fluttertoast.showToast(msg: "Grid is shown");
Navigator.pop(context);
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: ((context) => AppScreen(
sobj: sobj,
grid: grid,
))));
Fluttertoast.showToast(msg: "hahahah");
// Fluttertoast.showToast(msg: "hahahah");
// grid.getGrid(true);
},
))
Expand Down
13 changes: 7 additions & 6 deletions lib/app_screen_res.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,16 @@ class AppScreenRes {
child: IconButton(
icon: Icon(Icons.grid_on),
onPressed: ((() async {
Fluttertoast.showToast(
msg: MapServices.mapController.camera.state.zoomLevel
.toString());
double zoom;
if (grid.isDisplayed) {
grid.removeGrid();
} else {
if (MapServices.mapController.camera.state.zoomLevel
.toDouble() >=
19) grid.getGrid();
zoom =
MapServices.mapController.camera.state.zoomLevel.toDouble();
if (zoom >= 19)
grid.getGrid();
else
Fluttertoast.showToast(msg: "Zoom in more to see grid!");
}
})))));
if (sobj.usertype == 'user') {
Expand Down
4 changes: 2 additions & 2 deletions lib/listeners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ class FireListener {
// Fluttertoast.showToast(msg: data.toString());
if (data.runtimeType.toString() != 'String' &&
!hashes.contains(event.snapshot.key.toString())) {
Fluttertoast.showToast(msg: event.snapshot.key.toString());
// Fluttertoast.showToast(msg: event.snapshot.key.toString());
List d = data as List;
_convertToPolyline(d);
hashes.add(event.snapshot.key.toString());
Fluttertoast.showToast(msg: hashes.length.toString());
// Fluttertoast.showToast(msg: hashes.length.toString());
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions lib/routing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Routing {
_showRouteDetails(route);

showRouteOnMap(route.geometry);
Fluttertoast.showToast(msg: usertype.toString());
// Fluttertoast.showToast(msg: usertype.toString());
if (usertype == 'driver') {
_broadcastRoute(route);
}
Expand All @@ -146,6 +146,6 @@ class Routing {
ref.update({'route': route_});
var box = Hive.openBox('routes');
box.then((value) => value.put('route', route_));
Fluttertoast.showToast(msg: "path now put to firebase rtdb");
Fluttertoast.showToast(msg: "User will now see your route");
}
}
1 change: 0 additions & 1 deletion lib/services.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Services {
}
}
});
Fluttertoast.showToast(msg: "fail in sobj");
FireListener(this).listenToAcceptance();
}

Expand Down

0 comments on commit 006c87a

Please sign in to comment.