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/animation.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Padding( | |
padding: const EdgeInsets.only(top: 20, left: 20, right: 20), | |
child: PageAnimation() | |
) |
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'; | |
void main() => runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Padding( | |
// padding: const EdgeInsets.only(top: 20, left: 20, right: 20), | |
padding: const EdgeInsets.all(0), | |
child: Page() | |
) |
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
class Order { | |
var _id; | |
var _reference; | |
var date; | |
var code; | |
List<String> bookings; | |
Order(this._id, this._reference, {this.date}); | |
Order.withDiscount(this._id, this._reference, [this.code]) { | |
date = DateTime.now(); |
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'; | |
void main() => runApp(MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Padding( | |
padding: const EdgeInsets.all(20), | |
child: PageForm() | |
) | |
) |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
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:io'; | |
import 'package:args/args.dart'; | |
import 'package:http_server/http_server.dart'; | |
main(List<String> arguments) async { | |
ArgParser parser = ArgParser() | |
..addOption('dir', defaultsTo: 'web') | |
..addOption('port', defaultsTo: '8085'); | |
var parsedResults = parser.parse(arguments); |
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
// bin/main.dart | |
import 'dart:io'; | |
import 'package:mime/mime.dart'; | |
main() async { | |
var server = await HttpServer.bind('localhost', 8085); | |
server.listen((request) async { |
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'; | |
getDuration(int seconds) { | |
return Duration(seconds: seconds); | |
} | |
extension MyInt on int { | |
Duration get seconds => Duration(seconds: this); | |
DateTime monthsAgo() => DateTime.now().subtract(Duration(hours: 24 * 30 * this)); | |
} |
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:io'; | |
import 'dart:mirrors'; | |
main() async { | |
var server = await HttpServer.bind('localhost', 8085); | |
await for (HttpRequest req in server) { | |
// Create InstanceMirror type from which | |
// we retrieve metadata information | |
var ref = reflect(Endpoint(req)); |