This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
//import 'dart:io'; | |
import 'package:web_socket_channel/html.dart'; | |
import 'package:meta/meta.dart'; | |
import 'package:protobuf/protobuf.dart'; | |
import 'codec.dart'; | |
import 'error.dart' as centrifuge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The main point class | |
class LatLng { | |
/// Main contructor, no validation | |
const LatLng(this.latitude, this.longitude); | |
/// Contructor with coordinates validation | |
LatLng.validate(this.latitude, this.longitude) { | |
if (latitude > 90.0) { | |
throw WrongCoordinateException("The latitude can not exceed 90.0"); | |
} |