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 "DDAnnotationView.h" | |
#import "DDAnnotation.h" | |
#pragma mark - | |
#pragma mark DDAnnotationView implementation | |
@implementation DDAnnotationView | |
@synthesize mapView = _mapView; |
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 'package:flutter/material.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
class SettingsPage extends StatefulWidget { | |
@override | |
createState() => SettingsPageState(); | |
} | |
class SettingsPageState extends State<SettingsPage> { | |
GoogleMapController _mapController; |
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
void main() { | |
Book book = Book(title: 'bookTitle', description: 'bookDescription'); | |
Book book2 = Book.fromMap({'title': 'Book2', 'description': 'desc2'}); | |
print(book); | |
print(book2); | |
SuperBook superBook = SuperBook(title: "superBookTitle", description: "superBookDesc", size: 10); | |
print(superBook); | |
Author author1 = Author('fred', 'visticot'); |
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:math'; | |
//https://www.dartlang.org/articles/language/beyond-async | |
void main() async { | |
//final stocksSync = StocksService().stocksSync(); | |
//print(stocksSync); | |
//final stocksAsync = await StocksService().stocksAsync(); | |
//print(stocksAsync); |
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
void main() { | |
Car car1 = Car("Car1"); | |
car1.go(); | |
car1.sayHello(); | |
} | |
abstract class Vehicule { | |
final String name; | |
Vehicule(this.name); |
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
void main() { | |
int res = ComputeService().add(2, 4); | |
print("Res: $res"); | |
try { | |
int res = ComputeService().add(null, 4); | |
print("Res: $res"); | |
} on ComputeServiceException catch (e){ | |
print("Error: ${e.cause}"); | |
} |
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
void main() { | |
const books = [ | |
const Book('book1', "book1 desc"), | |
const Book('book2', "book2 desc") | |
]; | |
print("Books: $books"); | |
books.forEach((book) => print("${book.title}")); | |
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
void main() { | |
print(new Singleton() == new Singleton()); | |
} | |
class Singleton { | |
static final Singleton _instance = Singleton._internal(); | |
Singleton._internal(); | |
factory Singleton() => _instance; |
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
void main() { | |
var book1 = Book("Titre", null); | |
var book2 = null; | |
print("${book1.description}"); | |
print("${book2?.description}"); | |
var test = book1.description ?? "default"; | |
print(test); | |
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
void main() { | |
print("Hello world"); | |
} |
OlderNewer