Skip to content

Instantly share code, notes, and snippets.

void main() {
print('I \u2764 \u{1F3AF}');
}
void main() {
final List<String> flutterMasters = ['@dushesatwork', '@BleylDev', '@tadaspetra', '@JohannesMilke', '@sachaarbonel', '@BleylDev'];
print(flutterMasters);
print('Length of collection: ${flutterMasters.length}');
final Set <String> uniqueMasters = {...flutterMasters};
print(uniqueMasters);
print('Length of collection: ${uniqueMasters.length}');
}
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@fladago
fladago / main.dart
Created August 11, 2021 15:56
Maps in Dart
void main() {
var nMap = <String, String>{
//key //value
'🎯': '#dart',
'🏹': 'bow',
'🧵': 'thread'
};
nMap['♥️'] = "#flutter";
print(nMap['♥️']);
//Step3
late String lateName;
// final int finalName; // error
void main() {
//Step 1
final int x;
const int y = 1;
x = 8; // ok
// y = 2; // error: Constant variables can't be assigned a value.
import 'package:flutter/material.dart';
main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
@fladago
fladago / main.dart
Created August 23, 2021 16:39
castome shape
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@fladago
fladago / main.dart
Last active August 26, 2021 11:04
#1 Shape of the day
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@fladago
fladago / main.dart
Created August 29, 2021 10:07
Flutter the containers with shadows.
import 'package:flutter/material.dart';
class ShadowExamples extends StatelessWidget {
const ShadowExamples({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
@fladago
fladago / main.dart
Last active August 29, 2021 16:29
BorderSide doesn't work
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.