Skip to content

Instantly share code, notes, and snippets.

View synw's full-sized avatar

synw

View GitHub Profile
/// 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");
}
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;