Skip to content

Instantly share code, notes, and snippets.

View simoales's full-sized avatar

Simone Alessandria simoales

View GitHub Profile
@simoales
simoales / main.dart
Last active December 21, 2022 10:03
Starting code for flutter_secure_storage recipe
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@simoales
simoales / main.dart
Created August 5, 2020 15:49
Beginning code for the SharedPreferences recipe
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
[
{
"id": 1,
"pizzaName": "Margherita",
"description": "Pizza with tomato, fresh mozzarella and basil",
"price": 8.75
},
{
"id": 2,
"pizzaName": "Marinara",
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
[
{
"id": 1,
"pizzaName": "Margherita",
"description": "Pizza with tomato, fresh mozzarella and basil",
"price": 8.75,
"imageUrl": "images/margherita.png"
},
{
"id": 2,
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.
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
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],
};
void main() {
String name = 'Simone';
String result = reverse(name);
print (result);
String mySongs = sing();
print (mySongs);
String myName = 'Simone';
String yourName = 'Luke Skywalker';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Area Calculator App',