Skip to content

Instantly share code, notes, and snippets.

View yeasin50's full-sized avatar
☺️
Smile...It's Sunnah

Md. Yeasin Sheikh yeasin50

☺️
Smile...It's Sunnah
View GitHub Profile
void main() {
final List<Map<String, Object>> perguntas = [
{
'texto': 'Qual é a sua cor favorita?',
'respostas': ['Preto', 'Vermelho', 'Verde', 'Branco'],
},
{
'texto': 'Qual é o seu animal favorito?',
'respostas': ['Coelho', 'Cobra', 'Elefante', 'Leão'],
@yeasin50
yeasin50 / cornerRectPaint.dart
Created September 15, 2021 09:31
CustomPainter corner As decoration
class CustomDecorationPainter extends CustomPainter {
final double padding;
final double frameSFactor;
CustomDecorationPainter({
required this.padding,
required this.frameSFactor,
});
@override
@yeasin50
yeasin50 / main.dart
Created September 10, 2021 10:08
paint onClick
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@yeasin50
yeasin50 / main.dart
Created September 16, 2021 04:35
customPaint vs BoxPaint
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
@yeasin50
yeasin50 / main.dart
Created September 8, 2021 15:40
ListTile/Card with Row<Column>
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@yeasin50
yeasin50 / bouncy_top_sheet.dart
Created October 20, 2022 14:33 — forked from slightfoot/bouncy_top_sheet.dart
Bouncy Top Sheet - by Simon Lightfoot - 19/10/2022
import 'package:flutter/material.dart';
void main() {
runApp(const ExampleApp());
}
@immutable
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
import 'dart:collection';
import 'dart:ui' as ui;
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
// TODO
// * add short-circuit for a case when point's radius is zero?
// * check if [radius] / [radii] are not too big?
@yeasin50
yeasin50 / main.dart
Created January 11, 2023 19:37 — forked from slightfoot/main.dart
Example of overlays with search suggestions during HumpdayQ&A - 11th January 2023 - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@yeasin50
yeasin50 / profile_avatar.dart
Created January 18, 2023 20:53 — forked from slightfoot/profile_avatar.dart
Resizey Profile Avatar Thing for #HumpDayQandA - 18/01/2023 - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
import 'dart:math';
import 'dart:ui' show lerpDouble;
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/physics.dart';
import 'package:flutter/scheduler.dart';