Skip to content

Instantly share code, notes, and snippets.

{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "DOCUMENTATION",
"description": "",
"termsOfService": "YOUR_TERMS_OF_SERVICE_URL",
"contact": {
"name": "TEAM",
"email": "contact-email@something.io",
@mediumhust
mediumhust / index.ts
Created March 7, 2022 16:20
community
useEffect(() => {
if( location.pathname == '/community' ){
const search = location.search;
const hashtagParam = new URLSearchParams(search).get('hashtag');
const tab = new URLSearchParams(search).get('tab');
let _currentPostType = currentPostType;
if( tab ){
switch (tab) {
case PostTypes.Following.toLowerCase():
_currentPostType = PostTypes.Following;
.commnet-form-wrap {
border-top: 1px solid #03121d33;
border-bottom: 1px solid #03121d33;
padding: 10px 0;
}
.commnet-form-avatar {
flex: 0 0 32px;
padding:0;
margin-right: 8px;
}
777 Brockton Avenue, Abington MA 2351
30 Memorial Drive, Avon MA 2322
250 Hartford Avenue, Bellingham MA 2019
700 Oak Street, Brockton MA 2301
66-4 Parkhurst Rd, Chelmsford MA 1824
591 Memorial Dr, Chicopee MA 1020
55 Brooksby Village Way, Danvers MA 1923
137 Teaticket Hwy, East Falmouth MA 2536
42 Fairhaven Commons Way, Fairhaven MA 2719
374 William S Canning Blvd, Fall River MA 2721
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:xml/xml.dart';
import 'package:flutter/services.dart';
/// An example widget which uses an [SvgOverride] widget to render an SVG with dynamic colors.
class ZenButtonCookie extends StatelessWidget {
final CookieColor color; // My internal color object. Adapt this for your needs.
const ZenButtonCookie(this.color);
@mediumhust
mediumhust / overlay_with_hole.dart
Created October 9, 2020 09:58 — forked from flutter-clutter/overlay_with_hole.dart
Flutter overlay with a hole
import 'package:flutter/material.dart';
class OverlayWithHole extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Flutterclutter: Holes")),
body: _getExperimentOne()
);
}

This pure javascript function allows to dynamically include a script and then execute any function by using a callback.

  
/**********************************
*	FUNCTIONS
***********************************/

function loadScript(url, callback){
	var script = document.createElement("script"); 
import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,
@mediumhust
mediumhust / Flutter Local_Auth Setting for Android (MainActivity.kt) #kotlin.md
Created September 4, 2020 03:48 — forked from akifarhan/localAuthSettingsForAndroid_kotlin.md
Flutter Local_Auth Setting for Android (MainActivity.kt) #kotlin

Note that local_auth plugin requires the use of a FragmentActivity as opposed to Activity. This can be easily done by switching to use FlutterFragmentActivity as opposed to FlutterActivity in your manifest (or your own Activity class if you are extending the base class).

1. Open android>app>src>main>AndroidManifest.xml

Add USE_FINGERPRINT permission.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.[your.package]">
  <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
  <application...
@mediumhust
mediumhust / draggable_custom_painter.dart
Created August 14, 2020 10:55 — forked from mjohnsullivan/draggable_custom_painter.dart
Handling draggable areas or elements drawn on a Flutter CustomPainter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Draggable Custom Painter',
home: Scaffold(