Skip to content

Instantly share code, notes, and snippets.

@Sfshaza
Sfshaza / main.dart
Last active November 12, 2020 11:59
Step 7-NEW: Getting Started with Flutter codelab
// Final app - the app's primary color is now white.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Created April 18, 2018 18:12
Step 6-NEW: Flutter Get Started codelab
// Add a new route to hold the favorites.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Created April 18, 2018 16:52
Step 5-NEW: Getting Started with Flutter Codelab
// Make the heart icons tappable.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Last active April 12, 2019 00:28
Step 4a: Getting Starting with Flutter
// Add the heart icons to the ListView.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Last active March 3, 2018 04:47
Step 7: Flutter Get Started codelab
// Step 7 (Final): Change the app's theme
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Created February 24, 2018 05:03
Step 6: Flutter Get Started codelab
// Step 6: Navigate to a new route
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Last active March 3, 2018 04:45
Step 5: Flutter Get Started codelab
// Step 5: Add a lazily loading infinite scrolling ListView.
// Also, add a heart icon so users can favorite word pairings.
// Save the word pairings in the State class.
// Make the hearts tappable and save the favorites list in the
// State class.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
@Sfshaza
Sfshaza / main.dart
Last active April 18, 2018 01:01
Step 4: Flutter's Getting Started Codelab
// Create an infinite scrolling lazily loaded list
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Last active April 12, 2019 00:28
Step 3 - Flutter's Getting Started Codelab
// Add a stateful widget
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Sfshaza
Sfshaza / main.dart
Last active April 12, 2019 00:28
Step 2: Flutter Getting Started Codelab
// Add the English words package and generate a word pairing each
// time the app is hot reloaded.
import 'package:flutter/material.dart';
import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override