Skip to content

Instantly share code, notes, and snippets.

Avatar

Simone Alessandria simoales

View GitHub Profile
@simoales
simoales / main.dart
Created Aug 9, 2020
Starting code for flutter_secure_storage recipe
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@simoales
simoales / main.dart
Created Aug 5, 2020
Beginning code for the SharedPreferences recipe
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
View pizzalistrealworld.json
[
{
"id": 1,
"pizzaName": "Margherita",
"description": "Pizza with tomato, fresh mozzarella and basil",
"price": 8.75
},
{
"id": 2,
"pizzaName": "Marinara",
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
View pizzalist.json
[
{
"id": 1,
"pizzaName": "Margherita",
"description": "Pizza with tomato, fresh mozzarella and basil",
"price": 8.75,
"imageUrl": "images/margherita.png"
},
{
"id": 2,
View Flutter_Cookbook_ch_07_01_begin.dart
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
View future_demo_start.dart
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
View formulas.dart
dynamic _formulas = {
'0':[1,0.001,0,0,3.28084,0.000621371,0,0],
'1':[1000,1,0,0,3280.84,0.621371,0,0],
'2':[0,0,1,0.0001,0,0,0.00220462,0.035274],
'3':[0,0,1000,1,0,0,2.20462,35.274],
'4':[0.3048,0.0003048,0,0,1,0.000189394,0,0],
'5':[1609.34, 1.60934,0,0,5280,1,0,0],
'6':[0,0,453.592,0.453592,0,0,1,16],
'7':[0,0,28.3495,0.0283495,3.28084,0,0.0625, 1],
};
View dart_basics.dart
void main() {
String name = 'Simone';
String result = reverse(name);
print (result);
String mySongs = sing();
print (mySongs);
String myName = 'Simone';
String yourName = 'Luke Skywalker';
View area_calculator.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Area Calculator App',
You can’t perform that action at this time.