presented by Jack Frosch
In my first career,
I drove these...
In my second career,
I mostly drive these...
My other Meetup
1st Tuesday of the month
// create file named hello.dart
main() {
print(‘Hello Dart developers’);
}
// compile it
// dart2native hello.dart -o hello
// On Mac, make output file executable
// chmod +x hello
// Run it
// $ hello
FlutterTours.com offers self-guided audio tours from the convenience of your mobile phone or tablet. Users can browse the tour catalog, search for tours within a specified range of current location or a map location, or find tours using key words. Tours can be purchased, then downloaded to one or multiple devices for a personal, offline guided tour.
The following pages illustrate what the application might look like on a smart phone...
$ flutter create flutter_tours
$ cd flutter_tours
$ git init
Command Line
via Android Studio
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
...
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title), // widget is MyHomePage
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
...
...
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
}
}
Dart
Flutter
Me
Email: jackfrosch@flutterfare.com
Twitter: @jackfrosch, @flutterfare
LinkedIn: jackfrosch