Skip to content

Instantly share code, notes, and snippets.

FROM golang:1.17.1-alpine3.14 AS build
WORKDIR /src/
COPY go.* /src/
RUN go mod download
COPY ./ /src/
RUN CGO_ENABLED=0 go build -o /bin/demo
FROM scratch
COPY --from=build /bin/demo /bin/demo
ENTRYPOINT [ "/bin/demo" ]
@fladago
fladago / main.dart
Created September 4, 2021 10:19
Triangle
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 29, 2021 17:03
Kingdom of Shadows
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.
@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.
@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 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 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
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(
//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.
@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['♥️']);