Skip to content

Instantly share code, notes, and snippets.

View kspo's full-sized avatar
🐢
To The Mooon

Selman Poyraz kspo

🐢
To The Mooon
View GitHub Profile
@kspo
kspo / text_cloud.dart
Created November 16, 2023 19:35
Simple Text Cloud Widget
import 'dart:math';
import 'package:flutter/material.dart';
import 'arrow.shape.dart';
class TextCloud extends StatefulWidget {
// final String text;
final Color color;
final EdgeInsets padding;
@kspo
kspo / arrow.shape.dart
Created November 16, 2023 01:37
Arrow Shape
import 'package:flutter/cupertino.dart';
class ArrowPaint extends CustomPainter {
final Color color;
ArrowPaint({required this.color});
@override
void paint(Canvas canvas, Size size) {
Path path_0 = Path();
@kspo
kspo / custom_dropdown.dart
Created October 25, 2023 20:49
Custom Dropdown Button
import 'dart:ui';
import 'package:flutter/material.dart';
class CustomDropdown<T> extends StatefulWidget {
/// the child widget for the button, this will be ignored if text is supplied
final Widget child;
/// onChange is called when the selected option is changed.;
/// It will pass back the value and the index of the option.
@kspo
kspo / multiple_theme.dart
Last active October 25, 2023 20:49
Flutter Multiple Theme Adoption
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class ThemeStuff {
static ThemeStuff? _instance;
static ThemeStuff get instance {
_instance ??= ThemeStuff._init();