This file contains hidden or 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
| return new SingleChildScrollView( | |
| child: new Container( | |
| margin: const EdgeInsets.all(16.0), | |
| child: new Row( | |
| mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
| mainAxisSize: MainAxisSize.min, | |
| children: <Widget>[ | |
| new Expanded(child: new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints){ |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content="widgets library API docs, for the Dart programming language."> | |
| <title>widgets library - Dart API</title> | |
| <!-- required because all the links are pseudo-absolute --> |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| html, | |
| body { | |
| margin: 0; | |
| padding: 0; | |
| height: 100%; |
This file contains hidden or 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 TutorialHome extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| // Scafold is a layout for the major material design widgets. | |
| return new Scaffold( | |
| appBar: new AppBar( | |
| leading: new IconButton( | |
| icon: new Icon(Icons.menu), | |
| tooltip: 'Navigation menu', | |
| onPressed: null, |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <link href="styles.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <header>Top Nav</header> | |
| <div class="layout-body"> |
This file contains hidden or 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 'eventdetails/eventdetails.dart'; | |
| class SquanchyFlutterApp extends StatelessWidget { | |
| @override | |
| build(context: BuildContext): Widget { | |
| final theme = ThemeData( | |
| primarySwatch: MaterialColor(0XFFE65B77, { |
This file contains hidden or 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
| var stack = Stack ( | |
| key: 1 | |
| Image.asset ( // background photo | |
| "assets/texture.jpg" | |
| fit: ImageFit.cover | |
| height: 600.0 | |
| ) | |
| Positioned ( // headline |
This file contains hidden or 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
| analyzer: | |
| strong-mode: true | |
| linter: | |
| rules: | |
| - always_declare_return_types | |
| - always_specify_types | |
| - annotate_overrides | |
| - avoid_as | |
| - avoid_empty_else | |
| - avoid_init_to_null |
This file contains hidden or 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
| // Real libraries and modules. | |
| library search; | |
| import 'dart:async' show Future; | |
| import 'package:flutter/http.dart' as http; | |
| // Future (aka Promise), type annotations, and top-level functions! | |
| // And yes, async/await without translators! | |
| Future<List<SearchResult>> fetchResults(String query) async { | |
| // single-quote strings, and string interpolation! |
This file contains hidden or 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( | |
| new MaterialApp( | |
| title: "Flutter Demo", | |
| routes: <String, RouteBuilder>{ | |
| '/': (RouteArguments args) => new FlutterDemo() | |
| } | |
| ) |