Skip to content

Instantly share code, notes, and snippets.

@hasanzia1993
hasanzia1993 / main.dart
Created March 30, 2020 06:37
Flutter Iphone X bottom notch padding fix for fixed bottom button
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
@hasanzia1993
hasanzia1993 / main.dart
Created March 29, 2020 18:41
To show popupmenu without using PopupMenuButton since it only works with onTap.
showCustomMenu(context) {
final RenderBox overlay = Overlay.of(context).context.findRenderObject();
showMenu(
context: context,
position: RelativeRect.fromRect(
_tapPosition & Size(40, 40),
Offset.zero & overlay.size
),
items: [
@hasanzia1993
hasanzia1993 / index.js
Created May 7, 2019 16:56 — forked from adrianhajdin/index.js
HTML Template
module.exports = ({ name, price1, price2, receiptId }) => {
const today = new Date();
return `
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PDF Result Template</title>
<style>
.invoice-box {